D'Arcy from Winnipeg
Musings of a Canadian BizTalk and SOA Developer

Curse you Oracle, Curse you to HELL...or...How to assign a sql string to an output cursor in PL/SQL

Friday, August 31, 2007 10:14 AM

Oh Oracle, you smooth talking Jezebel...how you toy with me and cause me so much pain!

So today I was working on a bit of PL/SQL where I needed to return the output of a sql string generated within my stored procedure through an output cursor.

We were banging our heads on our desk trying to figure out the syntax of how to do this...

Declare cursorOutput For Execute Immediate stringSQL

nope

Execute Immediate stringSQL Into cursorOutput

uh-uh

Then I found this post (http://www.oraclefans.com/oraclefans/forum/ora8/messages/3673.html) which explained it beautifully:

Open cursorOutput for stringSQL;

That's it. That's all you need to do. w00t! And now for the long weekend...

D


Feedback

No comments posted yet.


Post a comment





 

Please add 1 and 3 and type the answer here: