dynamic sql and bulk collect problem [message #37458] |
Fri, 08 February 2002 09:10 |
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;
/
|
|
|
|