Group_Concat Producing Duplicates

Creating tables and queries
Post Reply
shock3
Posts: 8
Joined: Mon Mar 25, 2013 7:21 am

Group_Concat Producing Duplicates

Post by shock3 »

My query is producing some duplicates/repeats, but it isn't in each line. Some work correctly.
Group_concat.JPG
Group_concat.JPG (21.26 KiB) Viewed 1516 times
I've checked to see if I have multiple entries in different tables that could cause this.
SQL.JPG
Thanks in advance!
OpenOffice 4.1.1 on Windows 7
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Group_Concat Producing Duplicates

Post by UnklDonald418 »

Since you didn't upload a sample database we can only guess what the problem might be.
In my tests

Code: Select all

GROUP_CONCAT(' ', "Offer") 
generates an error in HSQL which indicates you are using a different back end.
In my tests using HSQL

Code: Select all

GROUP_CONCAT(DISTINCT "Offer" ORDER BY "Offer" SEPARATOR ' ')
eliminated duplicates.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply