Scott,
Thank u very much - it did work:)
Alex
Alex,
If I'm understanding you right, you want the final output to be in column order from the original stored procedure.
To do that, simply add an order by clause to your final query:
select distinct tisc.column_name
from tempdb.information_schema.columns as tisc
join PDSKeywordTranslationTable as ktt
on tisc.column_name = ktt.keyword
join PDSParameterDefinitionTable as pdt
on pdt.keyword = ktt.keyword
where tisc.table_name like '#tempalex___%' and pdt.module = 'GSM'
ORDER BY TISC.ORDINAL_POSITION
Scott
[/quote]