4
Answers

Convert Rows into Column in Sql Server

sarfaraz ali

sarfaraz ali

9y
630
1
Hi ,
How To convert Rows To column iN SQL Without Using Povit & Aggregate function ????
 
I have use this Query   (select DE.name, DV.value from dbo.DemographicsElementSet as DESET, dbo.DemographicsElement as DE, dbo.DataValue as DV where DESET.demElementSetGroupId ='6F2E5F4B-22CF-4AFF-9B6E-C4856B1D086E' and DE.demElementId = DESET.demElementRef and DV.valueId = DE.valueRef)
result display Like
 name  value 
 
Country
City
State
Contact Mobile
First Name
Gender
Specialization
Post Code
Contact LandLine
Middle Name
Address
Last Name
HospitalName
 
 
 
03
28754
283108
khan
sarfaraj
Male
1003
GZB
single
01/01/1992
8800636868
ali
03
 
 
I want output as
 name Country      C ity           State ...............
 value 03               28754   283108
 
 
Answers (4)