1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| SELECT cli.Nom,
cli.IdClient,
dad.TypeDocument,
dad.DateEcheance,
dad.NumeroDocument,
dad.TypeFacturation,
dod.DocDetailNumeroArticle,
dod.DocDetailIdFamille,
dod.DocDetailQuantite,
dod.DocDetailPrixVente,
dod.DocDetailDesignation,
dod.DocDetailPlu,
dod.DocDetailTauxTva,
dod.DocDetailType
FROM dbo.Clients as cli
INNER JOIN dbo.DocAdmin as dad
ON dad.IdClient = cli.IdClient
INNER JOIN dbo.DocDetail as dod
ON dod.NumDocAdmin = dad.NumeroDocument
WHERE dad.IdClient = 77
AND dad.TypeFacturation = 'M'
AND dad.DateEcheance between {d '2011-01-26'} and {d '2001-02-01'}
AND dod.DocDetailIdFamille = 3
ORDER BY dad.NumeroDocument ASC |
Partager