<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Creating Comma Separate Values List from Table &#8211; UDF &#8211; SP</title>
	<atom:link href="http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:12:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ned</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-173327</link>
		<dc:creator><![CDATA[Ned]]></dc:creator>
		<pubDate>Thu, 29 Sep 2011 23:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-173327</guid>
		<description><![CDATA[This is awesome.

Thank you!]]></description>
		<content:encoded><![CDATA[<p>This is awesome.</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-140198</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 10 Jun 2011 08:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-140198</guid>
		<description><![CDATA[EXEC(&#039;Select * from Testtable Where (NAME in (&#039;+@Front+&#039;))&#039;]]></description>
		<content:encoded><![CDATA[<p>EXEC(&#8216;Select * from Testtable Where (NAME in (&#8216;+@Front+&#8217;))&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Venkat</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-139843</link>
		<dc:creator><![CDATA[Venkat]]></dc:creator>
		<pubDate>Wed, 08 Jun 2011 18:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-139843</guid>
		<description><![CDATA[Table :

ID NAME City
1 ABC MCLEAN
2 ABC RESTON
3 BCD ASHBURN
4 BCD HERNDON
5 DEF CHICAGO
------------------------------------------

Declare @Name varchar(MAX) 
Select @Name =  COALESCE(@Name+&#039;,&#039;,&#039;&#039;)+  &#039;&#039;&#039;&#039; + Name + &#039;&#039;&#039;&#039; FROM (Select Distinct NAME from Testtable) as t
Select @Name

Declare @Front Varchar(5000)
Select @Front = &#039;(&#039; + @Name + &#039;)&#039;
Select @Front

Select * from Testtable 
Where (NAME in (@Front))

I want to see above query works, I want the @Front to work, as I have to use Variable to pass.

Appreciate any reply back .

Thanks
Venkat]]></description>
		<content:encoded><![CDATA[<p>Table :</p>
<p>ID NAME City<br />
1 ABC MCLEAN<br />
2 ABC RESTON<br />
3 BCD ASHBURN<br />
4 BCD HERNDON<br />
5 DEF CHICAGO<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Declare @Name varchar(MAX)<br />
Select @Name =  COALESCE(@Name+&#8217;,',&#8221;)+  &#8221;&#8221; + Name + &#8221;&#8221; FROM (Select Distinct NAME from Testtable) as t<br />
Select @Name</p>
<p>Declare @Front Varchar(5000)<br />
Select @Front = &#8216;(&#8216; + @Name + &#8216;)&#8217;<br />
Select @Front</p>
<p>Select * from Testtable<br />
Where (NAME in (@Front))</p>
<p>I want to see above query works, I want the @Front to work, as I have to use Variable to pass.</p>
<p>Appreciate any reply back .</p>
<p>Thanks<br />
Venkat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sreedhar Vankayala</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-139294</link>
		<dc:creator><![CDATA[Sreedhar Vankayala]]></dc:creator>
		<pubDate>Mon, 06 Jun 2011 21:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-139294</guid>
		<description><![CDATA[You can try this also (Tested in SQL 2005)

SELECT   schema_Name(schema_id) AS SchemaName,
         name                   AS TABLE_NAME,
         ColumnsCount                        ,
         STUFF(COLUMN_NAME, 1, 1, &#039;&#039;) AS COLUMN_NAME
FROM     sys.tables t 
		 CROSS APPLY
         (	SELECT &#039;,&#039; + name AS [text()]
			FROM    sys.columns c
			WHERE   c.object_id = t.object_id FOR XML PATH(&#039;&#039;)
         ) o (COLUMN_NAME) 
		 CROSS APPLY
	     (	SELECT COUNT(*) ColumnsCount
			FROM    sys.columns c
			WHERE   c.object_id = t.object_id
         ) CC
-- Where t.name not in (&#039;&#039;)
ORDER BY 1, 2, 3]]></description>
		<content:encoded><![CDATA[<p>You can try this also (Tested in SQL 2005)</p>
<p>SELECT   schema_Name(schema_id) AS SchemaName,<br />
         name                   AS TABLE_NAME,<br />
         ColumnsCount                        ,<br />
         STUFF(COLUMN_NAME, 1, 1, &#8221;) AS COLUMN_NAME<br />
FROM     sys.tables t<br />
		 CROSS APPLY<br />
         (	SELECT &#8216;,&#8217; + name AS [text()]<br />
			FROM    sys.columns c<br />
			WHERE   c.object_id = t.object_id FOR XML PATH(&#8221;)<br />
         ) o (COLUMN_NAME)<br />
		 CROSS APPLY<br />
	     (	SELECT COUNT(*) ColumnsCount<br />
			FROM    sys.columns c<br />
			WHERE   c.object_id = t.object_id<br />
         ) CC<br />
&#8211; Where t.name not in (&#8221;)<br />
ORDER BY 1, 2, 3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chandrashekar</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-87176</link>
		<dc:creator><![CDATA[chandrashekar]]></dc:creator>
		<pubDate>Thu, 09 Sep 2010 03:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-87176</guid>
		<description><![CDATA[Hi Pinal,

Thank you ,this article helped me a lot.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Thank you ,this article helped me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-61171</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 13:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-61171</guid>
		<description><![CDATA[The code should be


DECLARE @listStr VARCHAR(MAX)
SELECT @listStr = COALESCE(@listStr+&#039;,&#039; , &#039;&#039;) + NumberCols
FROM (SELECT DISTINCT NumberCols from NumberTable) as t
SELECT @listStr]]></description>
		<content:encoded><![CDATA[<p>The code should be</p>
<p>DECLARE @listStr VARCHAR(MAX)<br />
SELECT @listStr = COALESCE(@listStr+&#8217;,&#8217; , &#8221;) + NumberCols<br />
FROM (SELECT DISTINCT NumberCols from NumberTable) as t<br />
SELECT @listStr</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-61169</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 13:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-61169</guid>
		<description><![CDATA[It means that If the value of the first expression is null, make it empty]]></description>
		<content:encoded><![CDATA[<p>It means that If the value of the first expression is null, make it empty</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gyan</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-57073</link>
		<dc:creator><![CDATA[Gyan]]></dc:creator>
		<pubDate>Tue, 27 Oct 2009 13:25:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-57073</guid>
		<description><![CDATA[There is a better Option available for  the same job.


select cast(NumberCols as varchar)+&#039;,&#039; from NumberTable
for xml path (&#039;&#039;)

it saves so many operations and rest all query it self speaks.]]></description>
		<content:encoded><![CDATA[<p>There is a better Option available for  the same job.</p>
<p>select cast(NumberCols as varchar)+&#8217;,&#8217; from NumberTable<br />
for xml path (&#8221;)</p>
<p>it saves so many operations and rest all query it self speaks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tejas Shah</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-54326</link>
		<dc:creator><![CDATA[Tejas Shah]]></dc:creator>
		<pubDate>Fri, 31 Jul 2009 13:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-54326</guid>
		<description><![CDATA[Hi,

please refer: http://www.sqlyoga.com/2009/02/sql-server-get-comma-separated-list.html

Let me know if you have any other situations.

Thanks,

Tejas]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>please refer: <a href="http://www.sqlyoga.com/2009/02/sql-server-get-comma-separated-list.html" rel="nofollow">http://www.sqlyoga.com/2009/02/sql-server-get-comma-separated-list.html</a></p>
<p>Let me know if you have any other situations.</p>
<p>Thanks,</p>
<p>Tejas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shobhit Awasthi</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-54312</link>
		<dc:creator><![CDATA[Shobhit Awasthi]]></dc:creator>
		<pubDate>Fri, 31 Jul 2009 11:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-54312</guid>
		<description><![CDATA[Hi Pinal,

I want the record to be display

ID            Name

1              abc, cde, efg
2               111,222,333
3                56]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I want the record to be display</p>
<p>ID            Name</p>
<p>1              abc, cde, efg<br />
2               111,222,333<br />
3                56</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek Cwajda</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-53581</link>
		<dc:creator><![CDATA[Tomek Cwajda]]></dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-53581</guid>
		<description><![CDATA[Better I make some example:
-----------------------------------------------------------------
SELECT campaign_name
     , ( SELECT member_email +&#039;;&#039;
          FROM competition (NOLOCK)
         WHERE campaign_key = C.c_key 
         FOR XML PATH(&#039;&#039;)
       ) recipients
  FROM campaigns (NOLOCK) AS C
 WHERE DATE &gt; GETDATE()]]></description>
		<content:encoded><![CDATA[<p>Better I make some example:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
SELECT campaign_name<br />
     , ( SELECT member_email +&#8217;;&#8217;<br />
          FROM competition (NOLOCK)<br />
         WHERE campaign_key = C.c_key<br />
         FOR XML PATH(&#8221;)<br />
       ) recipients<br />
  FROM campaigns (NOLOCK) AS C<br />
 WHERE DATE &gt; GETDATE()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek Cwajda</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-53579</link>
		<dc:creator><![CDATA[Tomek Cwajda]]></dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:16:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-53579</guid>
		<description><![CDATA[I prefer such:

Select name+&#039;,&#039;
from something
for xml path(&#039;&#039;)


The POWER :-)  of this solution that you can use this in subquerys also.]]></description>
		<content:encoded><![CDATA[<p>I prefer such:</p>
<p>Select name+&#8217;,&#8217;<br />
from something<br />
for xml path(&#8221;)</p>
<p>The POWER :-)  of this solution that you can use this in subquerys also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ila</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-52469</link>
		<dc:creator><![CDATA[Ila]]></dc:creator>
		<pubDate>Wed, 27 May 2009 09:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-52469</guid>
		<description><![CDATA[How to get only distinct rows as comma separated?]]></description>
		<content:encoded><![CDATA[<p>How to get only distinct rows as comma separated?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Creating comma separate list from table Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-45743</link>
		<dc:creator><![CDATA[SQL SERVER - Creating comma separate list from table Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Mon, 19 Jan 2009 19:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-45743</guid>
		<description><![CDATA[[...] February 20, 2007 by pinaldave    Update : (5/5/2007) I have updated the script to support SQL SERVER 2005.  Visit :SQL SERVER - Creating Comma Separate Values List from Table - UDF - SP [...]]]></description>
		<content:encoded><![CDATA[<p>[...] February 20, 2007 by pinaldave    Update : (5/5/2007) I have updated the script to support SQL SERVER 2005.  Visit :SQL SERVER &#8211; Creating Comma Separate Values List from Table &#8211; UDF &#8211; SP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valeda</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-44409</link>
		<dc:creator><![CDATA[Valeda]]></dc:creator>
		<pubDate>Wed, 26 Nov 2008 18:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-44409</guid>
		<description><![CDATA[Is it possible to get distinct values only?]]></description>
		<content:encoded><![CDATA[<p>Is it possible to get distinct values only?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilija</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-44226</link>
		<dc:creator><![CDATA[Ilija]]></dc:creator>
		<pubDate>Fri, 14 Nov 2008 15:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-44226</guid>
		<description><![CDATA[Thanks you are the best...]]></description>
		<content:encoded><![CDATA[<p>Thanks you are the best&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shruti</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-39739</link>
		<dc:creator><![CDATA[Shruti]]></dc:creator>
		<pubDate>Thu, 03 Jul 2008 17:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-39739</guid>
		<description><![CDATA[Hi Pinal,

In my company we need to do opposite of above and that is parsing the comma seperated values into  rows of table.

I found following script which works very fast as I have parsed 20 million records in just under 5 mins.

Hope this will help others too.

--First Create a table with numeric values form 1 to 8000
CREATE TABLE Tally
        (ID INT)

DECLARE	@count INT 

SELECT	@count =1 

WHILE	@count &lt; 8001
BEGIN
        INSERT	INTO    Tally(ID)
        SELECT  @count 

		SELECT @count=@count+1
END 


SELECT  Comma_Seperated_List,
        NULLIF(SubString(&#039;,&#039; + product_list + &#039;,&#039; , ID , CharIndex(&#039;,&#039; , &#039;,&#039; + product_list + &#039;,&#039; , ID) - ID) , &#039;&#039;) AS &#039;Value&#039;
FROM    Tally T,
        My_table M
WHERE   ID                                              0 --remove this line to keep NULL rows


Your comments are appriciated.

Thanks,
SK]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>In my company we need to do opposite of above and that is parsing the comma seperated values into  rows of table.</p>
<p>I found following script which works very fast as I have parsed 20 million records in just under 5 mins.</p>
<p>Hope this will help others too.</p>
<p>&#8211;First Create a table with numeric values form 1 to 8000<br />
CREATE TABLE Tally<br />
        (ID INT)</p>
<p>DECLARE	@count INT </p>
<p>SELECT	@count =1 </p>
<p>WHILE	@count &lt; 8001<br />
BEGIN<br />
        INSERT	INTO    Tally(ID)<br />
        SELECT  @count </p>
<p>		SELECT @count=@count+1<br />
END </p>
<p>SELECT  Comma_Seperated_List,<br />
        NULLIF(SubString(&#8216;,&#8217; + product_list + &#8216;,&#8217; , ID , CharIndex(&#8216;,&#8217; , &#8216;,&#8217; + product_list + &#8216;,&#8217; , ID) &#8211; ID) , &#8221;) AS &#8216;Value&#8217;<br />
FROM    Tally T,<br />
        My_table M<br />
WHERE   ID                                              0 &#8211;remove this line to keep NULL rows</p>
<p>Your comments are appriciated.</p>
<p>Thanks,<br />
SK</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahendra Patil</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-39430</link>
		<dc:creator><![CDATA[Mahendra Patil]]></dc:creator>
		<pubDate>Mon, 23 Jun 2008 06:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-39430</guid>
		<description><![CDATA[Hi,

I used COALESCE in my project to reterive the comma separate values.

syntax :- 

COALESCE (storage, separetor, startvalue)

storage :-  variable which contain final output. In option 1 @listStr is storage.

separetor :- value which distigush between two item. for example here &#039;,&#039; (comma) you can put any value like &#039;/&#039;,&#039;A&#039;.

startvalue :- list start with this value.

for example 

I want Output : start , first,second,third,fourth,fifth

COALESCE(@listStr, &#039;,&#039; , &#039;start,&#039;).

thanks
Mahendra]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I used COALESCE in my project to reterive the comma separate values.</p>
<p>syntax :- </p>
<p>COALESCE (storage, separetor, startvalue)</p>
<p>storage :-  variable which contain final output. In option 1 @listStr is storage.</p>
<p>separetor :- value which distigush between two item. for example here &#8216;,&#8217; (comma) you can put any value like &#8216;/&#8217;,'A&#8217;.</p>
<p>startvalue :- list start with this value.</p>
<p>for example </p>
<p>I want Output : start , first,second,third,fourth,fifth</p>
<p>COALESCE(@listStr, &#8216;,&#8217; , &#8216;start,&#8217;).</p>
<p>thanks<br />
Mahendra</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Create a Comma Delimited List Using SELECT Clause From Table Column Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-39173</link>
		<dc:creator><![CDATA[SQL SERVER - Create a Comma Delimited List Using SELECT Clause From Table Column Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Thu, 12 Jun 2008 07:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-39173</guid>
		<description><![CDATA[[...] I have previously written similar article where I have demonstrated this method using three sample examples. You can read the article for further information. SQL SERVER - Creating Comma Separate Values List from Table - UDF - SP [...]]]></description>
		<content:encoded><![CDATA[<p>[...] I have previously written similar article where I have demonstrated this method using three sample examples. You can read the article for further information. SQL SERVER &#8211; Creating Comma Separate Values List from Table &#8211; UDF &#8211; SP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mina</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-36430</link>
		<dc:creator><![CDATA[Mina]]></dc:creator>
		<pubDate>Fri, 02 May 2008 22:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-36430</guid>
		<description><![CDATA[Hi Pinal,

I have a column with dx codes separated by commas.  I need to break these out into separate columns within the same table.  How is this done or what is the best way to get this done?

Here is an example:
      DX                           
------------
V72.0, V32.0, 245.

OUTPUT NEEDED:
 
   DX                           DX1          DX2         DX3
--------                       -------         ------        -------
V72.0, V32.0, 245.       V72.0      V32.0       245


Thanks!
Mina]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I have a column with dx codes separated by commas.  I need to break these out into separate columns within the same table.  How is this done or what is the best way to get this done?</p>
<p>Here is an example:<br />
      DX<br />
&#8212;&#8212;&#8212;&#8212;<br />
V72.0, V32.0, 245.</p>
<p>OUTPUT NEEDED:</p>
<p>   DX                           DX1          DX2         DX3<br />
&#8212;&#8212;&#8211;                       &#8212;&#8212;-         &#8212;&#8212;        &#8212;&#8212;-<br />
V72.0, V32.0, 245.       V72.0      V32.0       245</p>
<p>Thanks!<br />
Mina</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-19965</link>
		<dc:creator><![CDATA[Nikhil]]></dc:creator>
		<pubDate>Thu, 15 Nov 2007 08:18:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-19965</guid>
		<description><![CDATA[i tried using both ways 1st and 2nd
when i use these techniques on large set of data ,say one thousand records i get a timed out sql exception.this works fine on small amount of data (few rows).

how could i achieve  this on large data..................]]></description>
		<content:encoded><![CDATA[<p>i tried using both ways 1st and 2nd<br />
when i use these techniques on large set of data ,say one thousand records i get a timed out sql exception.this works fine on small amount of data (few rows).</p>
<p>how could i achieve  this on large data&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prashant Pandey</title>
		<link>http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-12910</link>
		<dc:creator><![CDATA[Prashant Pandey]]></dc:creator>
		<pubDate>Mon, 17 Sep 2007 08:45:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/06/sql-server-creating-comma-separate-values-list-from-table-udf-sp/#comment-12910</guid>
		<description><![CDATA[Hi Pinal,
U have used COALESCE( colname + &#039;,&#039;,&#039;&#039;)
What is the meaning of Second parameter here.????]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
U have used COALESCE( colname + &#8216;,&#8217;,&#8221;)<br />
What is the meaning of Second parameter here.????</p>
]]></content:encoded>
	</item>
</channel>
</rss>

