Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    69

    Unanswered: Reg. Cursor_Status()

    SQLServer has Cursor_Status() to check the status of cursors in the caller procedure. What is its equivalent in Oracle ??

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    I don't know of a status function but you can check for it being open with

    if cursor%isopen then ....

    Hth
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Furthermore, valid cursor attributes are also:
    • %ROWCOUNT (returns the number of rows processed by the cursor at that point)
    • %FOUND (Boolean; returns TRUE if the last fetch returned a row and FALSE if not)
    • %NOTFOUND (Boolean; returns TRUE if the last fetch did not return a row and FALSE if it did)
    • plus Bill's %ISOPEN (Boolean attribute; returns TRUE when a cursor is open)
    For explicit cursors, they are specified as cursor_name%attribute (for example, cur_dept%found).
    Implicit cursors are specified as SQL%attribute (for example, SQL%notfound).

Posting Permissions

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