Results 1 to 3 of 3

Thread: DB2 cursor size

  1. #1
    Join Date
    Jun 2011
    Posts
    1

    Question Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    It is hard to tell not given the query and the data. Please supply both and what you intend the query to return.

    Andy

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •