Jun 24, 2011 3:33 AM
Oracle cursor replacement
-
Like (0)
Hello All,
I have an oracle code to be migrated to netezza. I have a cursor in oracle and it has to be called in couple of occassions. No manipulation is done in the data of the cursor but if it returns as found then the manipulations should happen. And it should exit when it is not found. I gave the statement 'EXIT WHEN NOT FOUND' but it doesnt seem to work. Kindly help me in this regard.
Thanks,
S.Sampath Kumar
There are already several threads on this forums discussing the general topic of conversions from oracle - here's an example :
http://www.enzeecommunity.com/message/3651#3651
In general, you should think about what converting the higher level functionaity, not just trying to migrate PL/SQL code line by line..
D.
Agree with David. Reading through '6.0_Netezza_stored_procedures_guide.pdf' should also be helpful.
There is a LOOP construct in NZPLSQL that will give you similar capabilities of a cursor. Just remember, cursors and row level processing is EVIL. Use it at your own peril. :-)
As David suggests, you should probably rethink the process.

