Igor Tandetnik wrote:
> 
> On 1/19/2011 12:51 PM, Noah Hart wrote:
>>> select E, replace(group_concat(distinct T), ',', ';'),
>>> replace(group_concat(distinct P), ',', ';') from MyTable;
>>
>>Ahhh
>> the DISTINCT keyword was what I'm missing. However, this may be a bug,
>> when I use group_concat(DISTINCT T, ';') I get the error message
>> DISTINCT aggregates must have exactly one argument
> 
> That's why I had to muck around with replace(). The syntax only allows 
> DISTINCT keyword in aggregate functions taking exactly one parameter. 
> group_concat defaults to comma as a separator when called with one 
> parameter.
> -- 
> Igor Tandetnik
> 

Well, I went and read the page on the Aggregate Functions, and it is very
clear in the documentation.

Thanks again,

Noah

-- 
View this message in context: 
http://old.nabble.com/how-to-use-group_concat-uniquely-tp30712025p30716460.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to