GetTbColumn.txt 928 B

123456789101112131415161718192021222324
  1. select column_name||',' from user_tab_cols a where a.table_name = 'SEL_FUND_CUST_ACCOUNT' order by a.column_id asc
  2. select 'public static class' || ' SLM_BASE_CUSTOMER' || '{ '
  3. from dual
  4. union all
  5. select *
  6. from (select ' public static string ' || a.COLUMN_NAME || ' = ' || '"' ||
  7. a.COLUMN_NAME || '"' || ';'
  8. from user_tab_columns a
  9. where a.TABLE_NAME = 'SLM_BASE_CUSTOMER'
  10. order by a.COLUMN_ID)
  11. union all
  12. select ' }' from dual
  13. select lower(case when a.DATA_TYPE like '%DATE%' then 'to_char('||a.COLUMN_NAME||','||''''||'{1}'||'''' ||') '||COLUMN_NAME
  14. else a.COLUMN_NAME end) ||','
  15. from user_tab_columns a where a.TABLE_NAME = 'SLM_ORDER_LINE' order by a.COLUMN_ID;
  16. select 'public static string ' || a.COLUMN_NAME || ' = ' || '"' ||
  17. a.COLUMN_NAME || '"' || ';'
  18. from user_tab_columns a
  19. where a.TABLE_NAME = 'SLM_ORDER_LINE'
  20. order by a.COLUMN_ID