there is the following code
declare
type r is record( rid rowid, acct_id number );
type t is table of r;
v t := t();
begin
...
execute immediate v_sql bulk collect into v;
...
end;
execute immediate fills collection with some data provided by v_sql statement: rowid of some table and acct_id as a number. Is it possible to use this collection in a way so that it would be possible to write later in this code:
delete ACCOUNTS@db_link_to_remote_database
where acct_id in ( *[here comes some magic subquery that supplies acct_id from collection]* )
If it is possible how this can be done?