﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / Concatinate the String with in single row / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 23:27:12 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Concatinate the String with in single row</title><link>http://www.sqlservercentral.com/Forums/Topic974641-338-1.aspx</link><description>Hi Dirk Wegener,          It is nice solution....Many -Many Thanks!!!</description><pubDate>Wed, 20 Oct 2010 02:29:39 GMT</pubDate><dc:creator>meet2aftab</dc:creator></item><item><title>RE: Concatinate the String with in single row</title><link>http://www.sqlservercentral.com/Forums/Topic974641-338-1.aspx</link><description>The Stuff() formula is used to get rid of the extra comma.Drew</description><pubDate>Wed, 25 Aug 2010 06:56:27 GMT</pubDate><dc:creator>drew.allen</dc:creator></item><item><title>RE: Concatinate the String with in single row</title><link>http://www.sqlservercentral.com/Forums/Topic974641-338-1.aspx</link><description>hi, i notice in the following link, for what i see as the same problem, they give a similar answer but wrap it with the STUFF function.I've tested this on my database and there doesn't seem to be any difference in output.I'm i just not seeing something or are they the same?[url]http://www.sqlservercentral.com/Forums/Topic973776-392-1.aspx[/url]</description><pubDate>Wed, 25 Aug 2010 05:39:34 GMT</pubDate><dc:creator>davidandrews13</dc:creator></item><item><title>RE: Concatinate the String with in single row</title><link>http://www.sqlservercentral.com/Forums/Topic974641-338-1.aspx</link><description>Many thanks,</description><pubDate>Wed, 25 Aug 2010 04:54:11 GMT</pubDate><dc:creator>Saravanan_tvr</dc:creator></item><item><title>RE: Concatinate the String with in single row</title><link>http://www.sqlservercentral.com/Forums/Topic974641-338-1.aspx</link><description>[code="sql"]create table #t1 (ITem_no int)insert into #t1 (Item_no) values (1)insert into #t1 (Item_no) values (2)insert into #t1 (Item_no) values (3)create table #t2 (ITem_no int, format varchar(16))insert into #t2 (Item_no, format) values (1, 'Soap')insert into #t2 (Item_no, format) values (1, 'Pen')insert into #t2 (Item_no, format) values (1, 'Pencil')insert into #t2 (Item_no, format) values (1, 'Eraser')insert into #t2 (Item_no, format) values (2, 'Soft Toys')insert into #t2 (Item_no, format) values (2, 'Soft Toys')insert into #t2 (Item_no, format) values (2, 'Adult Toys')insert into #t2 (Item_no, format) values (2, 'Kids Items')select   t1.*,   (    select t2.format + ', '    from #t2 t2     where t2.Item_no = t1.Item_no     order by t2.format    for xml path('')  )from #t1 t1[/code]</description><pubDate>Wed, 25 Aug 2010 00:16:40 GMT</pubDate><dc:creator>Dirk Wegener</dc:creator></item><item><title>Concatinate the String with in single row</title><link>http://www.sqlservercentral.com/Forums/Topic974641-338-1.aspx</link><description>HI allI have a master table with item_no as one of columnEx: table name:Table1 ITem_no123Table name: Table 2Item_no , format 1            Soap1            pen1            pencil1            eraser2            soft toys2            adult toys2            kids itemsNow i want to merge the table with below format ,with single row as output1   soap   pen  pencil eraser2   soft toys    adult toys kids items or 1   soap,   pen,  pencil, eraser2   soft toys,adult toys, kids items Thnaksin advanceRelationship table </description><pubDate>Tue, 24 Aug 2010 23:49:05 GMT</pubDate><dc:creator>Saravanan_tvr</dc:creator></item></channel></rss>