This is the query:
SELECT MSORNSTD.CONO40, MSORNSTD.WORD40, PARTS.PGMN35, MSORNSTD.ITEM40, PARTS.PDES35, MSORNSTD.WOOQ40, MSORNSTD.WQCM40, MSORNSTD.wOOQ40-MSORNSTD.wQCM40, MSORNSTD.WCOQ40, PARTS.DSFC35, PARTS.PGMJ35
FROM EUROPEAN.TVSPF00.MSORNSTD MSORNSTD, EUROPEAN.TVSPF00.PARTS PARTS
WHERE PARTS.CONO35 = MSORNSTD.CONO40 AND PARTS.PNUM35 = MSORNSTD.ITEM40 AND ((MSORNSTD.CONO40='88') AND (MSORNSTD.WORD40>'W180000'))
The matter is that I want to modify MSORNSTD.wOOQ40-MSORNSTD.wQCM40. If this value < 0 then it needs to be 0, and if this value => 0 then it needs to be just MSORNSTD.wOOQ40-MSORNSTD.wQCM40. No records can be exluded!
I'd be grateful for a clue!
SELECT MSORNSTD.CONO40, MSORNSTD.WORD40, PARTS.PGMN35, MSORNSTD.ITEM40, PARTS.PDES35, MSORNSTD.WOOQ40, MSORNSTD.WQCM40, MSORNSTD.wOOQ40-MSORNSTD.wQCM40, MSORNSTD.WCOQ40, PARTS.DSFC35, PARTS.PGMJ35
FROM EUROPEAN.TVSPF00.MSORNSTD MSORNSTD, EUROPEAN.TVSPF00.PARTS PARTS
WHERE PARTS.CONO35 = MSORNSTD.CONO40 AND PARTS.PNUM35 = MSORNSTD.ITEM40 AND ((MSORNSTD.CONO40='88') AND (MSORNSTD.WORD40>'W180000'))
The matter is that I want to modify MSORNSTD.wOOQ40-MSORNSTD.wQCM40. If this value < 0 then it needs to be 0, and if this value => 0 then it needs to be just MSORNSTD.wOOQ40-MSORNSTD.wQCM40. No records can be exluded!
I'd be grateful for a clue!