Click here to Skip to main content
14,699,869 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have one requirement.

I need to convert the columns data to rows in sql server 2000. Can you help me out.

Data is like this

SCRIPT ID	IQV ACTIVITY ID	QUESTION	ANSWER
5	900044	9 - sites in country	A. 1 - 9
5	900044	10b - Database	A. Oracle
5	900044	13 - Virtualised servers	A. None virtualised
5	900055	10 - Employees (users)	B.10 – 100
5	900055	Do Not Contact	No


I want to it in this way:
SCRIPT ID	IQV ACTIVITY ID	QUESTION	ANSWER	QUESTION	ANSWER	QUESTION	ANSWER
5	900044	9 - sites in country	A. 1 - 9	10b - Database	A. Oracle	13 - Virtualised servers	A. None virtualised
5	900055	10 - Employees (users)	B.10 – 100	Do Not Contact	No		



Please help me in this.

Thanks in advance!

Regards
Govardhan
Posted

   
Comments
Espen Harlinn 7-Nov-11 11:15am
   
That should do it, 5'ed!
thanks harlinn.

it is solved.
   

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