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.
Author |
Topic |
aditis
Starting Member
1 Post |
Posted - 2013-08-14 : 08:26:38
|
I have a table like this: ID Q1 A1 Q2 A2 R 1 A B C Dand I want the result to be like this: ID Q AR1 1 A BR2 1 C DPlease tell me the query to solve this |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-08-14 : 08:37:57
|
SELECT ID, Q1 AS Question, A1 Answer FROM tableNameUNION ALLSELECT ID, Q2, A2 FROM tableName--Chandu |
|
|
|
|
|