SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Merging two rows of an SQL table into single row
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bharath405
Starting Member

India
2 Posts

Posted - 10/31/2012 :  04:24:06  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

Germany
8765 Posts

Posted - 10/31/2012 :  05:11:24  Show Profile  Visit webfred's Homepage  Reply with Quote
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)

Singapore
17626 Posts

Posted - 10/31/2012 :  05:32:54  Show Profile  Reply with Quote
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
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000