Click here to Skip to main content
16,010,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table of the following row
Description
A;B

I need to generate a query of that return o/p of format
Description
A
B
Posted
Updated 1-Nov-10 2:42am
v2

 
Share this answer
 
Go through the below link


Pivot in sqlserver[^]
 
Share this answer
 
Please use link given by Rajesh Puli.

We can do this by temp table as well, but if we are using SQL Server then we should use the Features of SQL server
 
Share this answer
 
SQL
DECLARE @temptbl TABLE(details NVARCHAR(20),details1 NVARCHAR(20))
Insert into @temptbl VALUES('Details1','Details2')
select details from @temptbl
Union
select details1 from @temptbl
 
Share this answer
 
Comments
Rajesh Anuhya 1-Nov-10 9:22am    
????????????

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900