Bonjour
cette requete SQL (Hyperbase windev)
marche bien, mais je dois la modifier et rajouter un critere par rapport à la table client
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 SELECT SORTIES.IDREF AS IDREF, SUM(SORTIES.QNTSORTIE) AS SOMMEQNTSORTIE FROM SORTIES, ENTREES WHERE SORTIES.IDREF = {pIdref} AND SORTIES.DATESORTIE >= {pDatedebut} AND SORTIES.DATESORTIE <= {pDatefin} AND SORTIES.IDDEPOTS = {pIddepots} AND SORTIES.TYPESOR = {pTypesortie} AND SORTIES.IDENTREES = ENTREES.IDENTREES AND ENTREES.DATEENTREE <= {pEntreeDate} GROUP BY SORTIES.IDREF
Dans chaque table sorties et entree, j 'ai bien le ID client, dans la table client j ai une colonne TYPECLIENT qui contient soit 1 ou 2,3,4,5
Je dois exclure de ma requete tous les clients dont le TYPECLIENT = 3
comment faire ca ??
merci à vous
Partager