Page 1 of 1

querybuilder not accepting subquery as with where clause

Posted: Thu 22 Jan 2009 10:34
by jkuiper
I created this query with querybuilder:

Code: Select all

SELECT inkoopregels.*, bolnamen.naam AS bolnaam, 
typen.naam AS typnaam, typenmaten.maatvol, preparaties.naam AS preparatienaam,
  (SELECT SUM(aantal_bollen) FROM ontvangsten 
    WHERE ontvangsten.inkoopregelnummer = inkoopregels.inkoopregelnummer) AS ontvangenbollen
FROM inkoopregels 
  INNER JOIN artikelen ON inkoopregels.artikel = artikelen.artikel 
  INNER JOIN bolnamen ON artikelen.naamid = bolnamen.naamid 
  INNER JOIN typen ON artikelen.typ = typen.typ 
  INNER JOIN typenmaten ON typenmaten.typ = typen.typ 
     AND typenmaten.maat = artikelen.maat 
  INNER JOIN preparaties ON artikelen.preparatie = preparaties.preparatie
The query will execute without problems, but the designer does not accept this line:

Code: Select all

    WHERE ontvangsten.inkoopregelnummer = inkoopregels.inkoopregelnummer) AS ontvangenbollen

Posted: Fri 23 Jan 2009 07:07
by Duke
It's a known problem we will try to fix it in the next build.

Posted: Fri 23 Jan 2009 08:17
by jkuiper
thanks

Posted: Mon 27 Apr 2009 13:32
by Alexz
The new build of the dbForge Studio for MySQL v3.50 is available for download here http://www.devart.com/dbforge/mysql/stu ... nload.html.
You can check the fix of the described problem.