Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> how to cast dbms_output.chararr type to table
Is it possible?
I tried:
> create type o_line as object(line varchar2(255));
2 /
Type created.
> create type o_lines as table of o_line;
2 /
Type created.
> create table a1 (a varchar2(255));
Table created.
begin
dbms_output.enable; dbms_output.put_line('Line 1'); dbms_output.put_line('Line 2'); dbms_output.put_line('Line 3'); dbms_output.put_line('Line 4'); dbms_output.put_line('Line 5');
PL/SQL procedure successfully completed.
declare
outlines DBMS_OUTPUT.CHARARR;
numlines pls_integer := 100;
begin
dbms_output.get_lines(outlines, numlines);
insert into a1 (a)
select line from table(cast(outlines as o_lines));
end;
/
ERROR at line 7:
ORA-06550: line 7, column 33:
PLS-00382: expression is of wrong type
Received on Tue May 02 2006 - 06:38:52 CDT