Dynamic Column List in Select query [message #604989] |
Mon, 06 January 2014 15:23 |
deepa_balu
Messages: 74 Registered: March 2005
|
Member |
|
|
Hi,
I have a table with columns A,B,C1,C2 ,D1 ,D2
I would like to write a select query that will not select columns starting with 'C'
Say
I need only
SELECT A,B,D1,D2 from table.
how do I dynamically select the column list.
I tried to create a string list without the columns starting with C but don't know how to use the string list as column.
select to_char(wm_concat(column_name)) from dba_tab_columns where table_name=REFERENCE' and
column_name not like 'C%' )
|
|
|
|
|
|
|
|