Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search All Tables for a Value

Status
Not open for further replies.

Bonediggler1

Technical User
Jul 2, 2008
156
0
0
US
Experts-

I need some code that will search all tables/fields in a schema for a specific value. The db is relatively small so this isn't a huge issue. Not being very conversant with pl/sql, I cannot get the code I have found elsewhere on the net to work.

Thanks in advance for your help.
 
What is the datatype of the value you are looking for?
 
Can you please post the other code you have found to be unsuccessful (along with the problems you have encountered)?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
This is the code sample:

select
table_name,
column_name
from
(select
rownum,
table_name,
regexp_substr(dbms_xmlgen.getxml(‘select * from “‘||table_name||’”‘),’<[^>]*>&string</[^<]*>’) column_name from user_tables) where length(column_name)!=0;

Enter value for string: email


I am getting this error message: - Oracle Database Error: ORA-01740: missing double quote in identifier
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top