If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 cursor size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-11, 11:41
yummycg yummycg is offline
Registered User
 
Join Date: Jun 2011
Posts: 1
Question DB2 cursor size

How should I get the size of the cursor in DB2 -

The reason I ask this is I had a working stored procedure in my app which did not take any input parameter but had a business logic where in certain rows are selcted based on condition 1 and assigned to a cursor

For a specific testing this returns 3 rows - - This is not the exact cursor size -I am saying this based on business logic below i.e the updates

Now the change is to have a File name sent as a input and use it as condition 2 in the cursor

With this extra condition the cursor should return 2 rows only - But it still returns 3 rows - This is not the exact cursor size -I am saying this based on business logic below i.e the updates

When I give the select statement that is available in my cursor separtaely with substituted value for the conditions it executes properly returning only 2 rows

Is there any reason why my new condition is not reflecting in the cursor - The starting point for me would be to get the size of the cursor - Later I can find out if the new parameter is being passed correctly or my cursor is having issue

Pls help
Reply With Quote
  #2 (permalink)  
Old 07-01-11, 12:18
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
It is hard to tell not given the query and the data. Please supply both and what you intend the query to return.

Andy
Reply With Quote
  #3 (permalink)  
Old 07-06-11, 05:08
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
When you say "cursor" you actually mean "table" or "result set of a query"? And with "size" you mean the "number of rows"?

It would be very helpful to see the query or the whole stored procedure.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Tags
cursor, db2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On