I am trying to run a sql query that gives me all the tables and the column names.
I am running a sql query that gets all the code tables. The sql query is
Code: Select all
SELECT Name,TBNAME,COLNO FROM sysibm.syscolumns WHERE RIGHT(TBNAME,2) = 'CD'
ORDER BY TBNAME
Code: Select all
Name TBNAME COLNO
type_cd TYPE_CD 0
load_id TYPE_CD 1
load_tp TYPE_CD 2
type_desc TYPE_CD 3
The top result needs to be translated into
Code: Select all
Name TBNAME
type_cd load_id load_tp type_desc TYPE_CD
Thanks guys.