I how to fetch the data in sql server database like below
I have a table t1 with two columns item and desc like below
I need to fetch the data as below
item desc1 desc2 desc3 desc4
1 red small think null
2 white large null null
I am using sql server database.
Please provide both the querys for sql server databse 2005 and 2008 versions if queries need to write differently in these versions.