Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

convert to column records to column header

$
0
0
Dear All, 

I have a query, where i have a table where two columns is there.

I want to write a query convert first column records in Column header and second column records would come under that header.

Col1	 Col2		
FirstName     	Ajay		
LastName	Nath		
DOB	        25/08/1981		
Gender	        Male		
Output			
FirstName     	LastName	DOB	       Gender
Ajay	        Nath	      25/08/1981	Male


Please help me

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>