Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Find Columns that have a particular Value

verde1030Jul 14 2021

Hello All, is there a way to scan a particular Schema in an Oracle DB and try to find a particular 'Value' in a Column Name?

Background: Customers needed a new field that is not available in our Warehouse layer. When i spoke to the folks from our Front End Team, they pointed out to a particular 'Value' in their XML that i needed.
I know that our ETL process parses through the XML and populates data across multiple tables in our PSTG schema.
So i would like to scan that PSTG schema / all the tables(columns) in that schema for this particular value.

In the past i have used a query like below , but this just gives me Column names in a particular schema.(Doesnt look at the values in the columns).
-----------------
SELECT TO_CHAR(SYSDATE, 'MM/DD/YYYY') TODAY, T1.OWNER OWNER,
T1.TABLE_NAME "TABLE NAME", T1.COLUMN_NAME "COLUMN NAME",
DECODE(NULLABLE, 'N', 'NOT NULL') "NULL", DATA_TYPE||'('||DATA_LENGTH||')' "DATA TYPE",
LAST_ANALYZED, USER_STATS
FROM SYS.ALL_TAB_COLUMNS T1
WHERE T1.COLUMN_NAME LIKE '%COLUMN_NAME%'
and T1.OWNER LIKE '%SCHEMA_NAME_GOES_HERE%'
ORDER BY T1.TABLE_NAME;
------------------
Any thoughts please ? Thanks a lot!
My oracle version: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

This post has been answered by Hub Tijhuis on Jul 14 2021
Jump to Answer

Comments

cormaco

Maybe the Virtualbox forums are the better place to ask this question:
https://forums.virtualbox.org/

1 - 1

Post Details

Added on Jul 14 2021
4 comments
21,929 views