Question in Cursor

  • Hi,

    Why are there 2 fetch next statements in a cursor declaration??

  • The first loads the initial value into the cursor, this then allows you to check for the existence of a value and loop while one exists. If you didn't initially load the value, then the first time you checked its existence, it would be empty and the loop would end.

    Make sense?

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Hi,

    You mean to say at the time of the 1st fetch the row pointer is before the first record and the 1st fetch makes it to come to the first??

    The 2nd fetch then loops until there are records ..

    Am i right?

  • Yep:D that's how I believe it to be.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • probably will have to force our selves to believ e that it happens that way:D

    perhaps there could be no other explaination :hehe:

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply