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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Merging two rows of an SQL table into single row

Author  Topic 

bharath405
Starting Member

2 Posts

Posted - 2012-10-31 : 04:24:06
Hello All,

I need an SQL query which combines two rows of a same table into single row without altering number of columns

Please have a look into the example

columns id TEXTID L9 L7 L10 L12 L16

L9,L7,L10,L12,L16 1 1Error Störung Error Incident Disturbo
L9,L7,L10,L12,L16 8 8 Alarm Alarm Alarma Alarme Allarme

expected output should be

columns id TEXTID L9 L7 L10 L12 L16

L9,L7,L10,L12,L16 1 1 Error_Alarm Störung_Alarm Error_Alarma Incident_Alarme Disturbo_Allarme

K BHARATH KUMAR REDDY

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-10-31 : 05:11:24
Merging two posts into a single post

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=180233


Too old to Rock'n'Roll too young to die.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-10-31 : 05:32:54
quote:
Originally posted by webfred

Merging two posts into a single post

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=180233


Too old to Rock'n'Roll too young to die.



LOL


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -