Home » SQL & PL/SQL » SQL & PL/SQL » dynamic sql and bulk collect problem
dynamic sql and bulk collect problem [message #37458] Fri, 08 February 2002 09:10 Go to next message
Susan Higashi
Messages: 1
Registered: February 2002
Junior Member
I am getting the error PLS-00457: "expressions have to be of SQL types" when I execute the code shown below. I'm using Oracle 8.1.6/AIX. According to the Oracle documentation, executing bulk binding operations using dynamic sql is supported. Does anyone know what the fix to this problem is?

declare
type nt_cn is table of townships.cn%type;
cn_in nt_cn;
tab varchar2(30);
begin
tab := 'TOWNSHIPS';
execute immediate
'begin select cn bulk collect into :mycn '||
'from '||tab||'; end;' using out cn_in;
dbms_output.put_line(cn_in.count);
end;
/
Re: dynamic sql and bulk collect problem [message #38597 is a reply to message #37458] Mon, 29 April 2002 13:26 Go to previous message
wpp
Messages: 1
Registered: April 2002
Junior Member
looks like u messed up with begin end. You need no begin end with the Dyamic sql
Previous Topic: select the row effective by a given date
Next Topic: Re: DBMS_OBFUSCATION_TOOLS.MD5()
Goto Forum:
  


Current Time: Thu Apr 25 14:07:54 CDT 2024