|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Question for the GurusHi,
If I have the foll table table1 1 2 3 4 how can I write a select statement to display the data in one row as 1,2,3,4 Thanks Bunch of ideas from Anith Sen in this link.
http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/msg/2d85bf366dd9e73e AMB Show quote "Chris" wrote: > Hi, > If I have the foll table > > table1 > 1 > 2 > 3 > 4 > > how can I write a select statement to display the data in one row as > > 1,2,3,4 > > Thanks Chris,
There is a way to "rotate" the data. But the method you use depends on what other columns you have in the table. A great example can be found at the following URL: http://www.sqljunkies.com/Article/D6053804-239C-4A77-A7A5-12F04E6166B1.scuk Hope this helps. Jeff -- Show quoteJeff Swearingen MSSQL DBA "Chris" wrote: > Hi, > If I have the foll table > > table1 > 1 > 2 > 3 > 4 > > how can I write a select statement to display the data in one row as > > 1,2,3,4 > > Thanks |
|||||||||||||||||||||||