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)
 Pivot

Author  Topic 

harlingtonthewizard
Constraint Violating Yak Guru

352 Posts

Posted - 2009-09-17 : 22:31:20
How would I use pivot to change this multiple row query into one row with two columns with titles of ProductVersion and Edition

Select ServerProperty ('ProductVersion') As ProductVersion
Union All
Select ServerProperty ('Edition') As Edition

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-09-17 : 22:37:12
don't need to use PIVOT at all
Select ServerProperty ('ProductVersion') As ProductVersion, 
ServerProperty ('Edition') As Edition



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-09-18 : 00:16:30
HI,

send ur full table structure, and data also
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-18 : 02:38:46
quote:
Originally posted by Nageswar9

HI,

send ur full table structure, and data also


No table is required. See Tan's query

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -