Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Angry Unanswered: Cursor Declaration

    I am having a problem declaring a "for update" cursor. I need to create a "for update" cursor because I need to delete from stlife_ratios table from the values returned from the cursor.

    what am I doing wrong?

    declare rec_cur cursor for select distinct report_date, org_num from stlife_ratios where org_num not in (select distinct org_num from fin_hist_lf where item_alias='S4_40' and report_date=20031231) and org_num > 100 and report_date=20031231 order by report_date for update

  2. #2
    Join Date
    Jul 2004
    You cannot delete a row from a cursor defined by a select statement containing a join, even if the cursor is updatable. - ASE

    Again your stmt have distinct clause

    Cursors that include order by, distinct, group by, or other clauses that create a worktable cannot be updated with positioned updates.

Posting Permissions

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