I have set of results from query that looks like this:
ID Type
6011 I
6411 I
6811 I
6911 I
6311 I
1021 L
1321 L
1421 L
1821 L
1921 L
2031 M
2431 M
2831 M
2931 M
2331 M
3041 S
3341 S
3441 S
3841 S
3941 S
Result set above is produced by this query:
SELECT rec_id, rec_type
FROM Table 1
I would like to show records like this:
ID Type
6011, 6411, 6811, 6911, 6311 I
1021, 1321, 1421, 1821, 1921 L
2031, 2431, 2831, 2931, 2331 M
3041, 3341, 3441, 3841, 3941 S
I do not know how to achieve this in Sybase
. Is this a good fit for PIVOT
or UNPIVOT
? If anyone knows the way to get this to look like result set above please let me know. Thank you.