Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Collections in PL/SQL
Thanks so much,
I thought about using dynamic sql last night. I am using ref cursors, which
state that you cannot use dynamic sql with them...Can you return a cursor in
a function that's not a ref cursor? Make sense?
Thanks!
Susan
-----Original Message-----
From: Jamadagni, Rajendra [mailto:rajendra.jamadagni_at_espn.com]
Sent: Friday, January 19, 2001 1:30 PM
To: 'ORACLE-L_at_fatcity.com'; 'susan_at_filefrenzy.com'
Subject: RE: Collections in PL/SQL
Importance: High
Well I do this kind of thing all the time .... only that I use dynamic SQL so that I can plug in the param list for the in clause. I usually pass parameters in the format 'a,b,c,d,e,f,g' and then run a simple routine to translate them in to "('a','b','c','d')" minus the double quotes of course etc.
This can then be easily made part of a dynamic SQL that I construct. It is working flawlessly for more than 2 years for me. To 'quote' the params I use something like ...
vsz_ParamString := '(' || '''' || replace(pi_instr, ',', ''''||','||'''') || '''' || ')';
If you want to use dynamic SQL, this is the easiest way.
HTH
Raj
This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify ESPN at (860) 766-2000 and delete this e-mail message from your computer, Thank you.