Skip to content
Advertisement

how could i add the value of below three fields of a table and store it into user define fields from DB2 query

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.

Query below:

Advertisement

Answer

your question is not clear actually If your table is TB for example, and you want SUM of those value for each TB.ITEM_NO so you might use this query:

And if you want to calculate Sum of these values for all items so:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement