graziazi
asked on
Cursor in SQL
Hi. I want to use a cursor on a table of managers. If any manager has a salary less that 10k raise and error. If manager has salary > than 50k output a message and re-raise the exception.
This is what i have so far............
DECLARE CURSOR man_cur IS SELECT * FROM manager WHERE salary < 10000.........
I'm confused after this. Thanks
This is what i have so far............
DECLARE CURSOR man_cur IS SELECT * FROM manager WHERE salary < 10000.........
I'm confused after this. Thanks
ASKER
Yes I want a pl/sql procedure with a loop through the cursor. Ok let's simplify by taking out the 90k clause
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
For example: are you wanting a pl/sql procedure with a loop through the cursor? If you hit a vlue and raise an exception, it stops. How do you want to 'output' a value before the exception?
Sample data and expected results would help a lot.