by bodhi » Thu Aug 09, 2007 1:22 pm
SELECT GP.NO_PART_BASE,
GP.NO_PART_PREFIX,
GP.NO_PART_SUFFIX,
GP.NO_PART_CONTROL,
GP.DS_PART,
GP.CD_PART_STATUS,
GP.CD_PART_TYPE
FROM GMP_GEN_PART GP
WHERE GP.CD_PLANT = :WS-PLANT-HOLD
AND GP.NO_PART_BASE
|| GP.NO_PART_PREFIX
|| GP.NO_PART_SUFFIX
|| GP.NO_PART_CONTROL > :WS-CON-GP-PART
AND GP.CD_PART_STATUS NOT IN (:LIT-O, :LIT-D)
AND GP.CD_PART_TYPE IN (:LIT-EI, :LIT-CS)
AND GP.CD_DECOST_IND IN (:LIT-SP, :LIT-R)
AND EXISTS
(SELECT " "
FROM GMP_CSTBY_ACCT CB
WHERE CB.CD_PLANT = :WS-PLANT-HOLD
AND GP.CD_PLANT = CB.CD_PLANT
AND GP.NO_PART_BASE = CB.NO_PART_BASE
AND GP.NO_PART_PREFIX = CB.NO_PART_PREFIX
AND GP.NO_PART_SUFFIX = CB.NO_PART_SUFFIX
AND GP.NO_PART_CONTROL = CB.NO_PART_CONTROL
AND CB.YY_YEAR = :GMPC005-YY-YEAR
AND CB.CD_COST_TYPE = :LIT-A
AND CB.CD_RECORD_TYPE
IN (:LIT-1,:LIT-2,:LIT-6,:LIT-9)
AND CB.DT_EFFECTIVE <= :WS-MONTH-END-CURR
AND CB.DT_EFFECTIVE > :WS-MONTH-END-PRIOR)
i am asking about the bolded part....