How to access alias name of a cursor column?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: How to access alias name of a cursor column?

Hybrid View

  1. #1
    Join Date
    Oct 2001
    Posts
    22

    Question

    I have a cursor that ive given an alias for one of its columns:
    cursor cur is
    select sum(debit) - sum(credit) rem_bal, emp_no
    from balance
    group by emp_no

    Now, when i come to use that cursor like so:
    for i in cur loop
    if i.rem_bal>0 then
    ....
    end if;
    end loop;
    I get errors when i use rem_bal as a column from the cursor
    But, so how can i reference that first column from the cursor using an alias, and what if i didnt use an alias, how then?
    Peace
    Sakitah

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Should be OK, please post the error message and code.

Posting Permissions

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



Click Here to Expand Forum to Full Width