Page 1 of 1

query results doesn't make sense

Posted: Mon 26 May 2014 07:50
by jkuiper2105
I have three tables (webcustomers, weblanden, webtalen). Table webcustomers has 1814 records.
This query

Code: Select all

SELECT
  webcustomers.customerid,
  webcustomers.name,
  webcustomers.email,
  weblanden.omschrijving AS land,
  webtalen.omschrijving AS taal,
  webcustomers.landid
FROM webcustomers
  INNER JOIN weblanden
    ON webcustomers.landid = weblanden.landcode
  INNER JOIN webtalen
    ON webcustomers.taalid = webtalen.taalcode
ORDER BY webcustomers.landid
gave me 2018 records. Sometimes I see double records in my results.
I wonder why dbForge is doing it. Even export to a file gave me 2018 records.

I'm using DBforge Studio for MySQL 6.1.166 Standard Edition

Re: query results doesn't make sense

Posted: Mon 26 May 2014 10:31
by alexa
Could you please send us the CREATE definitions of the tables?

You can send a reply straight to our support system at supportATdevartDOTcom, so we will keep further correspondence with you on this issue via e-mail.

Re: query results doesn't make sense

Posted: Mon 26 May 2014 12:13
by jkuiper2105
I've looked further and saw a index in weblanden was not created on the ID.
So there were two same ID's.
It's look like mariadb shows the the row twice if a joined table has two ID's of the same.
Removed the second ID and worked as if it should be.

Sorry for the trouble. It's my fault. This topic can be closed.

Re: query results doesn't make sense

Posted: Tue 27 May 2014 09:19
by alexa
Thank you for updating us on this issue.

Please let us know if any questions arise.