Cursor question



IBM's flagship relational database management system

Cursor question

Postby ysrinu123 » Wed Feb 23, 2011 10:14 am

if i declare cursor it saticify 100 rows in table.but i want to stop cursor at 50 th row (before ending).there is any possibility?
ysrinu123
 
Posts: 5
Joined: Tue Feb 22, 2011 11:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cursor question

Postby dick scherrer » Wed Feb 23, 2011 10:34 am

Hello,

When you have a question you need to start a new topic in the appropriate part of the forum rather than "tag it on" to something else you are posting in some unrelated part of the forum. . .

This has been split and moved to the db2 part of the forum (which is hopefully where it should be).

Your question is not at all clear. . . If you want to stop after processing 50 rows, maintain a count and FETCH no more when your limit is reached (50 in this example).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post