Culwatrnca11
asked on
Teradata SQL - Is it possible to take each line item and turn into column headers.
I have this code which displays each DX number in one column. I would like these to show in 5 different columns as the headers, is that possible?
,case
when dx.line = 1 then 'DX_1'
when dx.line = 2 then 'DX_2'
when dx.line = 3 then 'DX_3'
when dx.line = 4 then 'DX_4'
when dx.line = 5 then 'DX_5'
else 'N/A'
end as "DX_Line"
,case
when dx.line = 1 then 'DX_1'
when dx.line = 2 then 'DX_2'
when dx.line = 3 then 'DX_3'
when dx.line = 4 then 'DX_4'
when dx.line = 5 then 'DX_5'
else 'N/A'
end as "DX_Line"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER