Your approach works but you could alternatively adapt this solution:
http://stackoverflow.com/questions/5193828/i-want-search-specific-value-in-all-columns-of-all-tables-in-oracle-11g

On Sun, Sep 11, 2011 at 5:20 PM, 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