1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| SELECT top 1 1 as periode, nz(DSum("prix","matable","periode=1 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 2 as periode, nz(DSum("prix","matable","periode=2 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 3 as periode, nz(DSum("prix","matable","periode=3 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 4 as periode, nz(DSum("prix","matable","periode=4 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 5 as periode, nz(DSum("prix","matable","periode=5 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 6 as periode, nz(DSum("prix","matable","periode=6 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 7 as periode, nz(DSum("prix","matable","periode=7 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 8 as periode, nz(DSum("prix","matable","periode=8 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 9 as periode, nz(DSum("prix","matable","periode=9 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 10 as periode, nz(DSum("prix","matable","periode=10 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 11 as periode, nz(DSum("prix","matable","periode=11 and monproduit = 'B'"),0) as montant from matable
UNION
SELECT top 1 12 as periode, nz(DSum("prix","matable","periode=12 and monproduit = 'B'"),0) as montant from matable |
Partager