Bonjour les amis,
j'aimerais bien arriver à résoudre un petit problème relatif à la synhetisation de 4 requetes en 1 seule :
Voici les 4 requetes :
select
EFAC.VRP,
SUM (LFAC.QTE * LFAC.PRIXU * ((100- LFAC.REM)/100)) as "supérieur à 199"
from
EFAC, LFAC
where lfac.nof=efac.nof and efac.datecrea between '01/12/2007' and '14/12/2007' and lfac.typa='SUP 200'
group by
EFAC.VRP;
select
EFAC.VRP,
SUM (LFAC.QTE * LFAC.PRIXU * ((100- LFAC.REM)/100)) as "Inférieur à 199"
from
EFAC, LFAC
where lfac.nof=efac.nof and efac.datecrea between '01/12/2007' and '14/12/2007' and lfac.typa='INF 200'
group by
EFAC.VRP;
select
EFAC.VRP,
SUM (LFAC.QTE * LFAC.PRIXU * ((100- LFAC.REM)/100)) as "MODEM"
from
EFAC, LFAC
where lfac.nof=efac.nof and efac.datecrea between '01/12/2007' and '14/12/2007' and lfac.typa='MODEM'
group by
EFAC.VRP;
select
EFAC.VRP,
SUM (LFAC.QTE * LFAC.PRIXU * ((100- LFAC.REM)/100)) as "recharge aux revendeurs"
from
EFAC, LFAC
where lfac.nof=efac.nof and efac.datecrea between '01/12/2007' and '14/12/2007' and lfac.fam='RECHARGE' AND EFAC.REM <> 0
group by
EFAC.VRP;
est ce possible de faire un seul affichage pour les quatre dans le même tableau :
vendeur Sup 199 Inf. 199 Recharge revendeur Modem
Oracle 10g
Partager