Search Postgresql Archives

ERROR: more than one row returned by a subquery used as an expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have the following Query with Subqueries.
This query gives the error : ERROR: more than one row returned by a subquery used as an expression. Is there a solution to solve this problem:

SELECT  tbl_wk_wedstrijd.wedstrijdid,
       tbl_wk_wedstrijd.thuisploeg AS thuisploegid,
       tbl_wk_wedstrijd.uitploeg AS uitploegid,
       (SELECT tbl_wk_land.landnaam FROM tbl_wk_land
INNER JOIN tbl_wk_landgroep ON tbl_wk_land.landid=tbl_wk_landgroep.landid INNER JOIN tbl_wk_wedstrijd ON tbl_wk_landgroep.landgroepid=tbl_wk_wedstrijd.thuisploeg
           WHERE tbl_wk_land.landid=tbl_wk_landgroep.landid) AS thuisploeg,
       (SELECT tbl_wk_land.landvlag FROM tbl_wk_land
INNER JOIN tbl_wk_landgroep ON tbl_wk_land.landid=tbl_wk_landgroep.landid INNER JOIN tbl_wk_wedstrijd ON tbl_wk_landgroep.landgroepid=tbl_wk_wedstrijd.thuisploeg
           ) AS thuisploegvlag,
       (SELECT tbl_wk_land.landnaam FROM tbl_wk_land
INNER JOIN tbl_wk_landgroep ON tbl_wk_land.landid=tbl_wk_landgroep.landid INNER JOIN tbl_wk_wedstrijd ON tbl_wk_landgroep.landgroepid=tbl_wk_wedstrijd.uitploeg
           ) AS uitploeg,
       (SELECT tbl_wk_land.landvlag FROM tbl_wk_land
INNER JOIN tbl_wk_landgroep ON tbl_wk_land.landid=tbl_wk_landgroep.landid INNER JOIN tbl_wk_wedstrijd ON tbl_wk_landgroep.landgroepid=tbl_wk_wedstrijd.uitploeg
           ) AS uitploegvlag,
       tbl_wk_stadion.stadionplaats,
       tbl_wk_stadion.stadionnaam,
       tbl_wk_stadion.stadiongrootte,
       tbl_wk_stadion.stadionplaatje,
       tbl_wk_typewedstrijd.typewedstrijdnaam,
       tbl_wk_wedstrijd.datumentijd,
       tbl_wk_wedstrijd.omschrijving,
       tbl_wk_wedstrijd.uitslagthuis,
       tbl_wk_wedstrijd.uitslaguit,
       (SELECT tbl_wk_groep.groepnaam FROM tbl_wk_groep
INNER JOIN tbl_wk_landgroep ON tbl_wk_groep.groepid=tbl_wk_landgroep.groepid INNER JOIN tbl_wk_wedstrijd ON tbl_wk_landgroep.landgroepid=tbl_wk_wedstrijd.thuisploeg
           ) AS groep

FROM tbl_wk_wedstrijd INNER JOIN tbl_wk_stadion ON tbl_wk_wedstrijd.stadionid=tbl_wk_stadion.stadionid INNER JOIN tbl_wk_typewedstrijd ON tbl_wk_wedstrijd.typewedstrijdid=tbl_wk_typewedstrijd.typewedstrijdid;

Thnx,

Arjan

_________________________________________________________________
Vind alles terug op je PC: MSN Search Toolbar http://toolbar.msn.nl/



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux