<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: select distinct collect</title>
	<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html</link>
	<description>Oracle Certified Master</description>
	<pubDate>Sun, 07 Sep 2008 07:10:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7431</link>
		<pubDate>Tue, 13 May 2008 14:49:54 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7431</guid>
					<description>I have posted your question on the otn documentation forum
&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=655089" rel="nofollow"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=655089&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I have posted your question on the otn documentation forum<br />
<a href="http://forums.oracle.com/forums/thread.jspa?threadID=655089" rel="nofollow">http://forums.oracle.com/forums/thread.jspa?threadID=655089</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7052</link>
		<pubDate>Thu, 08 May 2008 17:47:06 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7052</guid>
					<description>sorry for wordpress issue and thanks for comment, I will have a look</description>
		<content:encoded><![CDATA[<p>sorry for wordpress issue and thanks for comment, I will have a look
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Madhu</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7048</link>
		<pubDate>Thu, 08 May 2008 17:03:22 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7048</guid>
					<description>It's not showing up once again, wish there was preview. :-( 
Last try:

collect (column)</description>
		<content:encoded><![CDATA[<p>It&#8217;s not showing up once again, wish there was preview. <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
Last try:</p>
<p>collect (column)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Madhu</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7047</link>
		<pubDate>Thu, 08 May 2008 17:00:19 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7047</guid>
					<description>For some reason a line is missing in my previous posting and the format is messed too.

The sql reference spec for collect is defined as:

(the missing line)

&lt;code&gt;
COLLECT (column)
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>For some reason a line is missing in my previous posting and the format is messed too.</p>
<p>The sql reference spec for collect is defined as:</p>
<p>(the missing line)</p>
<p><code></code>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Madhu</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7045</link>
		<pubDate>Thu, 08 May 2008 16:55:08 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-7045</guid>
					<description>On a side issue, if you look at the spec for collect in sql reference, it is defined as:
&lt;code&gt;
COLLECT (column)
&lt;/code&gt;
So it appears , collect (distinct column) should be a syntax error , but is not. We have a code that uses:
&lt;code&gt;
COLLECT (col1 order by col2)
&lt;/code&gt;
It works in general but we have run into ORA-00600 when used from a java application and have a open SR. I am not sure if we got lucky into using "order by" or if it's a documentation bug.
Any thoughts?

thanks.</description>
		<content:encoded><![CDATA[<p>On a side issue, if you look at the spec for collect in sql reference, it is defined as:<br />
<code></code><br />
So it appears , collect (distinct column) should be a syntax error , but is not. We have a code that uses:<br />
<pre><code>
COLLECT (col1 order by col2)
</code></pre><br />
It works in general but we have run into ORA-00600 when used from a java application and have a open SR. I am not sure if we got lucky into using &#8220;order by&#8221; or if it&#8217;s a documentation bug.<br />
Any thoughts?</p>
<p>thanks.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-6903</link>
		<pubDate>Tue, 06 May 2008 17:01:41 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-6903</guid>
					<description>too early

select job, collect(distinct deptno) deptnos
from emp group by job;

works

but

select collect(distinct deptno) deptnos
from emp group by job;

works

but not with distinct -- !-!!</description>
		<content:encoded><![CDATA[<p>too early</p>
<p>select job, collect(distinct deptno) deptnos<br />
from emp group by job;</p>
<p>works</p>
<p>but</p>
<p>select collect(distinct deptno) deptnos<br />
from emp group by job;</p>
<p>works</p>
<p>but not with distinct &#8212; !-!!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chen Shapira</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-6902</link>
		<pubDate>Tue, 06 May 2008 16:59:38 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comment-6902</guid>
					<description>Maybe its still too early in the morning, but:

select job, collect(distinct deptno) deptnos 
from emp group by job;

works.

Same query, remove one column and you get an error about order:

select distinct collect(distinct deptno) deptnos 
from emp group by job;

ERROR at line 1:
ORA-22950: cannot ORDER objects without MAP or ORDER method

How does that make sense?

(BTW. I understood the question as STRAGG question, but as I said, its still early)</description>
		<content:encoded><![CDATA[<p>Maybe its still too early in the morning, but:</p>
<p>select job, collect(distinct deptno) deptnos<br />
from emp group by job;</p>
<p>works.</p>
<p>Same query, remove one column and you get an error about order:</p>
<p>select distinct collect(distinct deptno) deptnos<br />
from emp group by job;</p>
<p>ERROR at line 1:<br />
ORA-22950: cannot ORDER objects without MAP or ORDER method</p>
<p>How does that make sense?</p>
<p>(BTW. I understood the question as STRAGG question, but as I said, its still early)
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
