Group_Concat Producing Duplicates

Creating tables and queries

Group_Concat Producing Duplicates

Postby shock3 » Thu Jun 20, 2019 1:35 am

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 432 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
shock3
 
Posts: 8
Joined: Mon Mar 25, 2013 7:21 am

Re: Group_Concat Producing Duplicates

Postby UnklDonald418 » Thu Jun 20, 2019 7:50 pm

Since you didn't upload a sample database we can only guess what the problem might be.
In my tests
Code: Select all   Expand viewCollapse view
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   Expand viewCollapse view
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.7 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1287
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 3 guests