Forum Moderators: open
Amount Month Year
12 Jan 2006
25 Feb 2006
62 Mar 2006
45 Jan 2005
32 Feb 2005
33 Mar 2005
I need to rearrange it to this
null Jan Feb Mar
2006 12 25 62
2005 45 32 33
I was thinking about using an array but I think that a data table might work better.
Is there a better way of doing this either in SQL server. I have a feeling that I will need to use brute force. But I am looking for an elegant solution
you dont have to select the data in any specific order, any way you want to you can do with your select statements.
Its much MUCH easier to get the SQL to order the columns rather than copying and adding to a new DataTable.
hth,
mcm