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 27 28 29 30 31 32 33 34 35
|
SELECT
d.*,
vc.CHP_COD,
vc.VALCHP,
KENG.ze_PIE_COD_WEB,
KENG.ze_PIE_COD_REF,
KENG.ze_PIELIG_NUM_LIG_WEB,
KENG.ze_ART_COD,
KENG.ze_PIELIG_QTE as PIELIG_QTE,
KENG.ze_PIELIG_CMT_CLI as PIELIG_CMT_CLI
FROM
ORD_ART d,
ORD_MDL_VALCHP vc,
( SELECT
op.PIE_COD_WEB as ze_PIE_COD_WEB,
op.PIE_COD as ze_PIE_COD_REF,
opl.PIELIG_NUM_LIG_WEB AS ze_PIELIG_NUM_LIG_WEB,
opl.ART_COD as ze_ART_COD,
PIELIG_QTE as ze_PIELIG_QTE,
PIELIG_CMT_CLI as ze_PIELIG_CMT_CLI
FROM
ORD_PIE op,
ORD_PIELIG opl
WHERE
op.PIE_COD=opl.PIE_COD
AND op.PIE_COD='XXXX'
) KENG
WHERE
KENG.ze_ART_COD=d.ART_COD
AND d.ART_WEB='XXXX'
AND d.ART_ACF='XXXX'
AND (vc.PIE_COD(+)=KENG.ze_PIE_COD_WEB)
AND (vc.PIELIG_NUM_LIG(+)=KENG.ze_PIELIG_NUM_LIG_WEB) |
Partager