Dear All,
Am trying to get the columns names from another table columns values. Here with i have give the example which i was trying to achieve.
Structure of Table A& B
TableA
ID NAME1 NAME2 NAME3 NAME4 NAME5
TableB
ID NAME1 NAME2 NAME3 NAME4 NAME5
Another Table contains value of Columns name of Table A & B.
Table_columns
Col_name table_name col_name1 table_name1
ID TABLEA ID TABLEB
NAME1 TABLEA NAME1 TABLEB
NAME2 TABLEA NAME2 TABLEB
My requirement is, when we ran the query to find the difference between TABLEA & TABLEB, need to select only the columns Present in the table TABLE_COLUMNS i.e columns ID,NAME1,NAME2 and not the other columns mean some thing as dynamically.
Am trying to achieve by using select statement but can't. Could some one help on this.
As this can be achievable using Execute immediate, but my requirement is to compare the columns values then insert into another table which is quite complex using execute immediate. So i trying to achieve using select statement.
Thanks & Regards
Sri M