mer. 26 mai 2021, 15h03
Damonzon
Mali
atoutfox.public.association
Re: Report avec une table parent et plusieurs tables enfants (4 ou 5)
Bonjour Jean,
J(ai fait la jointure avec toutes tables requises dans l'élaboration de mon report. Maintenant je me demande comment ajouter les colonnes dont j'ai besoin venant de ma table "BULLENT" sans être obligé d'utiliser la clause GROUP BY.
Ci-après la dernière requête selon ta deuxième solution
Lc_societe = societe.societe
Lc_periode = societe.datepaie
SELECT entid, societe, matricule, clef, periode ;
FROM bullent ;
WHERE societe=m.Lc_societe AND periode= m.Lc_periode ;
AND !DELETED("bullent") ;
INTO CURSOR ent1snodel READWRITE && peut servir pour tous les tests
SELECT ent.entid, ent.societe, ent.matricule, ent.clef, ent.periode, ;
COUNT(*) AS nbre ;
FROM ent1snodel ent;
Left Outer Join bulldet det ON ent.entid=det.detid AND ;
ent.societe=det.societe AND ent.matricule=det.matricule AND ;
ent.clef=det.clef AND ent.periode=det.periode ;
Left Outer Join bullcharg charg ON ent.entid=charg.chargid AND ;
ent.societe=charg.societe AND ent.matricule=charg.matricule AND ;
ent.clef=charg.clef AND ent.periode=charg.periode ;
Left Outer Join bullnet bnet ON ent.entid=bnet.netid AND ;
ent.societe=bnet.societe AND ent.matricule=bnet.matricule AND ;
ent.clef=bnet.clef AND ent.periode=bnet.periode ;
Left Outer Join bulltiers btiers ON ent.entid=btiers.tiersid AND ;
ent.societe=btiers.societe AND ent.matricule=btiers.matricule AND ;
ent.clef=btiers.clef AND ent.periode=btiers.periode ;
Left Outer Join bullcum bcum ON ent.entid=bcum.cumid AND ;
ent.societe=bcum.societe AND ent.matricule=bcum.matricule AND ;
ent.clef=bcum.clef AND ent.periode=bcum.periode ;
GROUP BY ent.entid, ent.societe, ent.matricule, ent.clef, ent.periode ;
HAVING COUNT(*) > 1 ;
INTO CURSOR test1
Bonne journée.
Damonzon.
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000019867