So... What's the Work-Around?
A reader, June 07, 2018 - 6:20 pm UTC
It's nice to know that I'm not going crazy when I ran into this myself, but it'd be nice to see a working word-around in the meantime.
June 08, 2018 - 7:05 am UTC
<code>
SQL> create table Z_TEST (
2 id integer,
3 val varchar2(10)
4 );
Table created.
SQL>
SQL> create or replace package ZPKG1 as
2 type ZTestColl is table of Z_TEST%rowtype;
3 procedure test;
4 end;
5 /
Package created.
SQL>
SQL> create or replace package body ZPKG1 as
2 tab1 ZTestColl := ZTestColl();
3
4 procedure test as
5 c integer;
6 wrapper sys.odcinumberlist;
7 begin
8 dbms_output.put_line('testing select from table()');
9 select count(*) into c from table(tab1);
10 dbms_output.put_line('testing select from .. where id in (select id from table())');
11 select count(*) into c from Z_TEST where id in (select id from table(tab1));
12 dbms_output.put_line('testing delete from .. where id in (select id from table())');
13 select id bulk collect into wrapper from table(tab1) ;
14 delete from Z_TEST where id in ( select column_value from table(wrapper));
15 end;
16 end;
17 /
Package body created.
SQL> sho err
No errors.
SQL>
SQL> set serverout on
SQL> exec zpkg1.test;
testing select from table()
testing select from .. where id in (select id from table())
testing delete from .. where id in (select id from table())
PL/SQL procedure successfully completed.
<code>
Not Just DELETE
D, July 31, 2018 - 2:00 pm UTC
August 01, 2018 - 12:36 pm UTC
thanks for the addenda