select replace(wm_concat('rps.'||nvl(dt.column_name,0)),',',' + ')
from dba_tab_columns dt, dba_col_comments dc
where dt.table_name = 'REPORT_E_CHANNEL_SETTLEMENT'
and dt.TABLE_NAME = dc.table_name
and dt.column_name=dc.column_name
and dc.comments like '%折扣金额%'
1,dba_tab_columns
2,dba_col_comments
3,like filter过滤
4,wm_concat
5,replace
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-757979/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-757979/