<?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: SQL trick: overcoming GROUP_CONCAT limitation in special cases</title>
	<atom:link href="http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/feed" rel="self" type="application/rss+xml" />
	<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases</link>
	<description>Blog by Shlomi Noach</description>
	<lastBuildDate>Wed, 01 Feb 2012 20:47:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: marcin</title>
		<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/comment-page-1#comment-57926</link>
		<dc:creator>marcin</dc:creator>
		<pubDate>Mon, 07 Nov 2011 14:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2580#comment-57926</guid>
		<description>you&#039;re right</description>
		<content:encoded><![CDATA[<p>you're right</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/comment-page-1#comment-57913</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Mon, 07 Nov 2011 12:27:16 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2580#comment-57913</guid>
		<description>@marcin,
I wrote: &quot;...I will follow the path where I assume I cannot control group_concat_max_len, not even in session scope...&quot;

Yes, if you have control, just change group_concat_max_len. This is not always the case. For example, I provide a schema with views which I expect you to install on your server. I cannot change your session variable since I am not the one invoking queries; it is YOU who is invoking queries using my own views. There&#039;s a hack around this, as well, and an ugly one as well.</description>
		<content:encoded><![CDATA[<p>@marcin,<br />
I wrote: "...I will follow the path where I assume I cannot control group_concat_max_len, not even in session scope..."</p>
<p>Yes, if you have control, just change group_concat_max_len. This is not always the case. For example, I provide a schema with views which I expect you to install on your server. I cannot change your session variable since I am not the one invoking queries; it is YOU who is invoking queries using my own views. There's a hack around this, as well, and an ugly one as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marcin</title>
		<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/comment-page-1#comment-57909</link>
		<dc:creator>marcin</dc:creator>
		<pubDate>Mon, 07 Nov 2011 11:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2580#comment-57909</guid>
		<description>before executing query try execute SET SESSION  group_concat_max_len = 20000</description>
		<content:encoded><![CDATA[<p>before executing query try execute SET SESSION  group_concat_max_len = 20000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/comment-page-1#comment-16004</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Thu, 22 Jul 2010 06:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2580#comment-16004</guid>
		<description>@strcmp: for completeness, the trick of CONCAT still makes it more robust, since otherwise you must add you own &quot;,&quot; separators between the GROUP_CONCAT parts; should any of them be empty, the manually added separators be invalid.</description>
		<content:encoded><![CDATA[<p>@strcmp: for completeness, the trick of CONCAT still makes it more robust, since otherwise you must add you own "," separators between the GROUP_CONCAT parts; should any of them be empty, the manually added separators be invalid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/comment-page-1#comment-16003</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Thu, 22 Jul 2010 06:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2580#comment-16003</guid>
		<description>@strcmp: wow! Thanks for this</description>
		<content:encoded><![CDATA[<p>@strcmp: wow! Thanks for this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: strcmp</title>
		<link>http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases/comment-page-1#comment-16001</link>
		<dc:creator>strcmp</dc:creator>
		<pubDate>Thu, 22 Jul 2010 05:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2580#comment-16001</guid>
		<description>You can use GROUP_CONCAT(IF(actor_id BETWEEN 1 AND 100, last_name, NULL)) instead of GROUP_CONCAT(IF(actor_id BETWEEN 1 AND 100, last_name, &#039;&#039;)) to get rid of the extra separators. &#039;&#039; is a normal value that will just be concatenated, NULL will be skipped.</description>
		<content:encoded><![CDATA[<p>You can use GROUP_CONCAT(IF(actor_id BETWEEN 1 AND 100, last_name, NULL)) instead of GROUP_CONCAT(IF(actor_id BETWEEN 1 AND 100, last_name, '')) to get rid of the extra separators. '' is a normal value that will just be concatenated, NULL will be skipped.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

