how to remove starting with '_'
904205Apr 2 2012 — edited Apr 2 2012Hi Experts,
I have a requirement like to produce all column names into a feed,for this i solved below query:
SELECT LISTAGG(SUBSTR(LTRIM(COLUMN_NAME,'S$'), 3), '|') WITHIN GROUP (ORDER BY COLUMN_ID) PATH
FROM USER_TAB_COLS
where table_name = 'S$_emp';
but some of the columns displayed in starting like _currency*
why because this table is auto generated from some tool,so every column name starts with s1_ ......to eliminate this i used trim,but even though i have a problem because from 10 th row onwards..........if i given substr length from 4 may loss some column starting names......
column names in db:
s1_a|s2_b|s3_c|s4_d|s5_e|s6_f|s7_g|s8_h|s9_i|s10_j|s11_k|
The above query o/p
a|b|c|d|e|f|g|h|i|_j|_k|
I need like:
a|b|c|d|e|f|g|h|i|j|k|
can any please help me...
Thanks,
Surya...