select
i.idxname,
rtrim((select c1.colname from syscolumns c1 where c1.colno=abs(i.part1) and t.tabid=c1.tabid) ||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part2 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part3 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part4 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part5 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part6 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part7 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part8 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part9 ) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part10) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part11) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part12) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part13) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part14) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part15) and t.tabid=c1.tabid),'')||
nvl(','||(select c1.colname from syscolumns c1 where c1.colno=abs(i.part16) and t.tabid=c1.tabid),''),',') collist
from sysindexes i,systables t
where
i.tabid=t.tabid
and t.tabname='t2';