Re: [sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Don V Nielsen
I think David Blake is suggesting that GROUP_CONCAT intuitively suggests it should take the separator argument, regardless of DISTINCT being present. It is logical that it should, given GROUP_CONCAT takes two arguments, not one. The second argument defaults to a comma when omitted. The presence of

Re: [sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Clemens Ladisch
Dave Blake wrote: > It seems that it is not possible to specify the concatenation separator > when using GROUP_CONCAT with DISTINCT. The documentation says: | In any aggregate function that takes a single argument, that argument | can be preceded by the

[sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Dave Blake
It seems that it is not possible to specify the concatenation separator when using GROUP_CONCAT with DISTINCT. For example while this works SELECT pub_id, GROUP_CONCAT(cate_id, " - ") FROM book_mast GROUP BY pub_id; and this works SELECT pub_id, GROUP_CONCAT(DISTINCT cate_id) FROM book_mast