Is there a way to look at a given schema (schema 'XYZ') and look at every column on every table, looking for a value of 35006 or '35006'? I don't know if one one table it may be an integer, or text on another table.
Basically, I need to find a needle in the proverbial haystack.
Here's what I have so far. I can't however figure out how to print out the table/column name when it does find a match. Any ideas ????
SET termout OFF echo OFF feed OFF trimspool ON head ON pages 0
-- Text values
SELECT 'select * from '||table_name||' where '||column_name||' like ''%35006%'''||';'
WHERE data_type = 'VARCHAR2'
--SELECT 'select * from '||table_name||' where '||column_name||' = 35006;'
--WHERE data_type = 'NUMBER'
SET termout ON
SET head ON feed ON