BookmarkSubscribeRSS Feed
BL_463_IDR
Calcite | Level 5

Dear All

I'm trying to find/search values from across tables or columns name based on value name that i want to search. So far, i could search and show the tables or columns by table or column name. 


This is my script that i used to search and show the tables or columns by table or column name:


PROC SQL;
CONNECT TO ORACLE (USER="xxxx" PASSWORD="xxxx"
    PATH="(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = xxx)
       (HOST = xxxxxxx) (PORT = xxxxx)))(CONNECT_DATA =(xxx = xxxx )))");
CREATE TABLE CEK.CEK_DWH_COLUMN (COMPRESS=YES) AS
SELECT * FROM CONNECTION TO ORACLE
(
SELECT owner, table_name, column_name FROM all_tab_columns WHERE column_name LIKE '%PRODUCT%');
QUIT;

 
From that query, the result in .bdat like example below:
OWNER | TABLE_NAME | COLUMN_NAME

DWH        PROUDUCT       PROGRAM

DWH        PROUDUCT       SRRKID

etc...

 

the result that i want, are like this below:

OWNER | TABLE_NAME | COLUMN_NAME | VALUES_NAME

DWH        PROUDUCT       PROGRAM            TITANIUM

DWH        PROUDUCT       SRRKID                  32102

etc...

 

Can anyone help me, how to find/search values from across tables or columns name based on values name?, thanks for your attention.

Regards 

 

3 REPLIES 3
BL_463_IDR
Calcite | Level 5
i want to get the values from accross the table_name and column_name
Kurt_Bremser
Super User

This does not answer my question. The values are not present in your example data, so from where do you get them?

See Maxim 42. Posting a detailed question will get you answers beyond "42".

hackathon24-white-horiz.png

Join the 2025 SAS Hackathon!

Calling all data scientists and open-source enthusiasts! Want to solve real problems that impact your company or the world? Register to hack by August 31st!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 971 views
  • 0 likes
  • 2 in conversation