<?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/"
		>
<channel>
	<title>Comments on: How to Create Delimited Lists of Related Data in Your MS SQL Queries</title>
	<atom:link href="http://www.rabidgadfly.com/index.php/2009/01/07/how-to-create-delimited-lists-of-related-data-in-your-ms-sql-queries/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rabidgadfly.com/index.php/2009/01/07/how-to-create-delimited-lists-of-related-data-in-your-ms-sql-queries/</link>
	<description>Glenn Gervais&#039;s methods, tips, and musings on Flash, ColdFusion, XML, and other web technology.</description>
	<lastBuildDate>Wed, 01 Sep 2010 12:20:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrew Maurer</title>
		<link>http://www.rabidgadfly.com/index.php/2009/01/07/how-to-create-delimited-lists-of-related-data-in-your-ms-sql-queries/comment-page-1/#comment-112073</link>
		<dc:creator>Andrew Maurer</dc:creator>
		<pubDate>Sat, 10 Oct 2009 14:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=98#comment-112073</guid>
		<description>Great info, thank you!
One issue I ran into was then I was converting a column that was of type int to a varchar. Your example doesn&#039;t allow for that difference. Here is what needs to change in the function. Consider myIDs column as int

  SELECT @myidList = COALESCE(@myidList + &#039;, &#039;, &#039;&#039;) + CAST(myIDs as varchar(100))

But... great and useful example. Thanks again!</description>
		<content:encoded><![CDATA[<p>Great info, thank you!<br />
One issue I ran into was then I was converting a column that was of type int to a varchar. Your example doesn&#8217;t allow for that difference. Here is what needs to change in the function. Consider myIDs column as int</p>
<p>  SELECT @myidList = COALESCE(@myidList + &#8216;, &#8216;, &#8221;) + CAST(myIDs as varchar(100))</p>
<p>But&#8230; great and useful example. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Creating a list of record data from a join &#171; CFDev</title>
		<link>http://www.rabidgadfly.com/index.php/2009/01/07/how-to-create-delimited-lists-of-related-data-in-your-ms-sql-queries/comment-page-1/#comment-102751</link>
		<dc:creator>Creating a list of record data from a join &#171; CFDev</dc:creator>
		<pubDate>Wed, 15 Apr 2009 12:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=98#comment-102751</guid>
		<description>[...] a list of record data from a&#160;join Very interesting post here. Only works in MS-SQL but it returns a list of data in a column in your query. I quite often need [...]</description>
		<content:encoded><![CDATA[<p>[...] a list of record data from a&nbsp;join Very interesting post here. Only works in MS-SQL but it returns a list of data in a column in your query. I quite often need [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.rabidgadfly.com/index.php/2009/01/07/how-to-create-delimited-lists-of-related-data-in-your-ms-sql-queries/comment-page-1/#comment-95450</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 08 Jan 2009 21:58:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=98#comment-95450</guid>
		<description>Without a visual example to see if I understand this right, I&#039;m not sure if I have the same solution or not...but for Oracle.  I found after much searching some code that would allow me to pull many related rows from a table and comma separate them into a single column connected to the parent table.  i.e. table A has a key to join to table B.  table B is many to one relation of A.  If my goal is to query A and get a single row back for each record in A but there are say 4 children records in B, normally you would get 4 rows back in your join.  This will instead return 1 row, with A&#039;s value in one column and B1, B2, B3, B4 combined in 1 row/column.

Anyway, I can dig out the code if anyone is interested.  It requires creating a custom function and a procedure if I recall correctly.  Should be pretty easy to do and its only about 25 lines of code.  Email hartwichr@hotmail.com if you are interested in an Oracle solution.

Ryan</description>
		<content:encoded><![CDATA[<p>Without a visual example to see if I understand this right, I&#8217;m not sure if I have the same solution or not&#8230;but for Oracle.  I found after much searching some code that would allow me to pull many related rows from a table and comma separate them into a single column connected to the parent table.  i.e. table A has a key to join to table B.  table B is many to one relation of A.  If my goal is to query A and get a single row back for each record in A but there are say 4 children records in B, normally you would get 4 rows back in your join.  This will instead return 1 row, with A&#8217;s value in one column and B1, B2, B3, B4 combined in 1 row/column.</p>
<p>Anyway, I can dig out the code if anyone is interested.  It requires creating a custom function and a procedure if I recall correctly.  Should be pretty easy to do and its only about 25 lines of code.  Email <a href="mailto:hartwichr@hotmail.com">hartwichr@hotmail.com</a> if you are interested in an Oracle solution.</p>
<p>Ryan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
