| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Execute Immediate : Can't run ...Please help
On 22 Apr 2005 08:06:21 -0700, zislam_at_gmail.com (Pial) wrote:
>Can anybody tell me what's the wrong with the EXECUTE IMMEDIATE. I am
>just pasting the code. The problem is in the EXECUTE IMMEDIATE strSql;
The problem is you seem to think execute immediate supports cursors.
It doesn't. It can run select into's assuming you use bindvariables
(execute immediate 'select name into :temp from emp where empno = 10'
using temp -- where temp is a variable)
, but you can't fetch multiple records.
For *that* you need OPEN <cursor variable> FOR 'select... ' etc.
So I guess some reading is in order.
-- Sybrand Bakker, Senior Oracle DBAReceived on Sat Apr 23 2005 - 04:09:25 CDT
![]() |
![]() |