| From: | Sébastien Dinot <sebastien(dot)dinot(at)free(dot)fr> |
|---|---|
| To: | pgsql-fr-generale(at)postgresql(dot)org |
| Subject: | Re: Jointure externe |
| Date: | 2005-09-06 10:23:32 |
| Message-ID: | 20050906102332.GA5535@newtech.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-fr-generale |
J'ai trouvé la solution à mon problème.
Sébastien Dinot a écrit :
| SELECT t.nom AS type, COUNT(a.*) AS nombre
| FROM abo AS a
| RIGHT OUTER JOIN type AS t ON t.type_id = a.type
| WHERE a.edi_id = <EDI_ID>
| GROUP BY t.nom;
Il faut écrire :
| SELECT t.nom AS type, COUNT(a.*) AS nombre
| FROM abo AS a
| RIGHT OUTER JOIN type AS t ON ( t.type_id = a.type AND a.edi_id = <EDI_ID> )
| GROUP BY t.nom;
Heureusement que j'ai trouvé cela sur un newsgroup car je ne l'aurais
pas deviné tout seul. )c:
Sébastien
--
Sébastien Dinot, sebastien(dot)dinot(at)free(dot)fr
http://sebastien.dinot.free.fr/
Ne goûtez pas au logiciel libre, vous ne pourriez plus vous en passer !
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xavier Poinsard | 2005-09-06 10:26:34 | Re: Jointure externe |
| Previous Message | Sébastien Dinot | 2005-09-06 10:07:32 | Re: Jointure externe |