Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pl/Sql Casting Objects: error using the TABLE operator
scott_at_ORA92> declare
2 vtbl my_type_table_object;
3 begin
4 SELECT CAST(MULTISET(select col1, col2 5 from my_table 6 ) 7 AS my_type_table_object 8 ) 9 INTO VTBL 10 from dual 11 ;
14 for vrow in (select ddb as col1, ddf as col2 15 from table(cast(vtbl as my_type_table_object 16 ) 17 ) 18 ) loop 19 dbms_output.put_line(to_char(vrow.col1, 'yyyy-mm-dd') 20 || ' ' 21 || to_char(vrow.col2, 'yyyy-mm-dd')); 22 end loop;
1900-01-01 1900-01-01 1900-01-02 1900-01-02
PL/SQL procedure successfully completed. Received on Mon Jul 04 2005 - 21:55:56 CDT
![]() |
![]() |