Cursor issue

  • My first question would be why are you using a cursor? Are you sure this cannot be done as a set-based process?

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • I will have to check that. Also, I found that cursor by itself doesn't know that in case resultset is empty then it shldn't proceed. To resolve this either we need to introduce a count(*) check before opening cursor or we can also make use of @@cursor_rows.

    Manu

Viewing 2 posts - 1 through 3 (of 3 total)

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