From my experience with Microsoft Access, I know you can create Cross-Tab queries if you have at least 3 fields. However, I am trying to create a Cross-Tab Query in SQL Server when I only have 2 fields. Here is sample of what I have:
And here is what I want to get to:
So essentially, I simply want to show each Company ID record once, and all their different Pay Frequencies listed across in its own field.
How can I accomplish this?
Thanks.
Code:
ID Pay_Freq
ABC A
MMM S
XYZ A
XYZ B
ABC W
XYZ W
And here is what I want to get to:
Code:
ID Pay1 Pay2 Pay3
ABC A W
MMM S
XYZ A B W
How can I accomplish this?
Thanks.