Thanks Richard but unfortunately I cannot use DISTINCT in that way, since it affects all the selected columns and they are MANY.
Staffan On Sun, Jan 11, 2015 at 12:43 AM, Richard Hipp <d...@sqlite.org> wrote: > On 1/10/15, Staffan Tylen <staffan.ty...@gmail.com> wrote: > > I'm in the situation where I need to use GROUP_CONCAT and filter out > > duplicates at the same time. And the default comma separator in > > GROUP_CONCAT needs to be replaced by a space. I've tried to use function > > REPLACE to get rid of the comma but only to realise that the data being > > concatenated also might contain one or more commas. > > > > SELECT group_concat(x,'+') FROM (SELECT DISTINCT a+b AS x FROM tab ORDER > BY 1); > > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users