hello,

You can look for dynamic sql.
With the cursor designed by you will give.you table name and column.

Now via loop, process all table and.columns.

Regards,
Jignesh Makwana
On Sep 12, 2011 2:50 AM, "Richard Ford, Jr." <[email protected]>
wrote:
> Hi All,
>
> I have a requirement where I need to determine if values exists in more
> than 90 tables, and if the records exists I need to insert into another
> table. This is what I have thus far:
>
> declare
>
> cursor c is
>
> select distinct table_name from user_tab_columns
>
> where (column_name like '%BARGENBR%' or
>
> column_name like '%OWNERID%'
>
> or column_name like '%TRIPNBR%')
>
> and table_name not like '%VW_%';
>
> begin
>
> for r in c loop
>
> select ownerid,bargenbr,tripnbr from r.table_name
>
> where ownerid = 'MMA' and tripnbr = 37 and bargenbr = 2220;
>
> end loop;
>
> end;
>
> Please forward any suggestions.
>
> Regards,
>
>
>
> Richard
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to