On 2015-10-09 12:55 AM, K. P. wrote: > Brilliant - thanks.Though I still do not understand my > errordistinct(t.LastName || ', ' || t.FirstName),Seems to me that I am > passing a single argument in parentheses to distinct....
You had a separator (DISTINCT ...... , '; ') as a second argument. I removed this and added it to the aggregate name. Hope that clears it up! > >> To: sqlite-users at mailinglists.sqlite.org >> From: rsmith at rsweb.co.za >> Date: Fri, 9 Oct 2015 00:38:10 +0200 >> Subject: Re: [sqlite] Can this be done in SQLite? >> >> >> >> On 2015-10-09 12:22 AM, K. P. wrote: >>> I tried this, of course, before asking, but: >>> group_concat(distinct(t.LastName || ', ' || t.FirstName), '; ') As Teachers, >>> gives >>> [15:19:32] Error while executing SQL query on database 'test': DISTINCT >>> aggregates must have exactly one argument >> As the error suggests, it can't have more than one argument (parameter), >> so this should work: >> >> group_concat(distinct (t.LastName || ', ' || t.FirstName || '; ')) As >> Teachers, >> >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users at mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users