I am looking for a solution to add the below three decimal fields and store them in a user defined field, these three fields belongs to 1 table and I need to sum the value of it. Kindly help!
I have tried the CAST and the convert function.
RECV_OH_QTY DECIMAL(7,0)
IN_PROC_OH_QTY DECIMAL(7,0)
CS_OH_QTY DECIMAL(7,0)
Query below:
SELECT TB.ITEM_NO,
TB.LOC,
TB.RECV_OH_QTY,
TB.IN_PROC_OH_QTY,
TB.CS_OH_QTY,
CAST(TB.RECV_OH_QTY + TB.IN_PROC_OH_QTY AS DECIMAL(7,0)) AS RES_VAR
FROM TB
WHERE TB.ITEM_NO = 'xxxxxxxx'
WITH UR;