1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| SELECT DISTINCT B0401.ST1_NOLOT,
B0900.ST_CODE,
( SELECT ROUND(
NVL(SUM( NVL(S.ST1_STOCK,0) * NVL(R.ST_VOL,1)
- NVL(S.ST1_RPREL,0) * NVL(R.ST_VOL,1)
- NVL(S.ST1_REXP,0) * NVL(R.ST_VOL,1)
),0)
,2)
FROM B0400 R,
B0401 S
WHERE R.ST_CODE = S.ST_CODE
AND R.ST_ACTI = '0'
AND B0401.ST_CODE = S.ST_CODE
AND B0401.T48_LIEU = S.T48_LIEU
AND B0401.T49_AIRE = S.T49_AIRE
AND B0401.EM_NUM = S.EM_NUM
AND B0401.EM_NIV = S.EM_NIV
AND B0401.ST1_NOLOT = S.ST1_NOLOT
AND B0401.ST1_DEGRES = S.ST1_DEGRES
AND NVL(B0401.ST1_CPTAGE,'@@') = NVL(S.ST1_CPTAGE,'@@') ) DISPO,
B0401.T48_LIEU, B0401.T49_AIRE, B0401.EM_NUM, B0401.EM_NIV,
B0401.ST1_DEGRES,
B0401.ST1_CPTAGE,
B0200.BA_LIB||' '||B0200.BA_MIL||' '||B0300.TA_LIB||' '||B0315.T15_LIBEL||' '||B0400.ST_DESI||' '||DECODE(B0316.T16_TYPE,'C','CRD','S','SR','ACQ')||' '||B0500.HA_LIB
FROM B0900,B0200,B0400,B0500,B0300,B0315,B0316,B0401
WHERE ... |
Partager