User SUN@ wrote:Ouch.. you are using an old discontinued and unsupported version of Oracle. And you want to mix and match code between that version and 11g, using the latest dynamic SQL and bulk processing features of Oracle? Double ouch.
I am using oracle 8i and oracle 11g database.
Example:-If 8i does not support dynamic bulk collection then it simply does not support dynamic bulk collection... have you looked at the 8i manual to see what is possible?
I want the bulk collect code to be dynamic.
declare type i_ref is ref cursor; itm_ref i_ref; type po_ln_rec is record ( c_itm_cd varchar2(20) ); type tt is table of po_ln_rec index by binary_integer; PO_LN_ITM_CD_COL tt; v_sql long := ' SELECT DISTINCT ITM_CD FROM PO_LN MINUS SELECT ITM_CD FROM ITM '; a number := 10; begin if a = 10 then execute immediate v_sql bulk collect into PO_LN_ITM_CD_COL ; if PO_LN_ITM_CD_COL.count > 0 then dbms_output.put_line('the are value s'); end if; end if; end;