Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 rows to columns

Author  Topic 

irfanshirur
Starting Member

21 Posts

Posted - 2009-09-15 : 03:17:07

Hello

Is there any command in SQL to convert each rows data in seperate Columns ?

This is my current output
Ex:
Number Value
08088J2440-H 04
08088J2440-H 11


Expected Output is :
Number Value Value1
08088J2440-H 04 11


Please can any one help me out to solve this problem .

Thanks
Regards
Mohammed Irfan

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-09-15 : 03:55:41
see the pivot and cross tab queries for this
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-16 : 13:30:40
quote:
Originally posted by irfanshirur


Hello

Is there any command in SQL to convert each rows data in seperate Columns ?

This is my current output
Ex:
Number Value
08088J2440-H 04
08088J2440-H 11


Expected Output is :
Number Value Value1
08088J2440-H 04 11


Please can any one help me out to solve this problem .

Thanks
Regards
Mohammed Irfan


will number of values to cross tab be same always?
Go to Top of Page
   

- Advertisement -