I am new to integrating DB2 into our website, and have managed to get the select statement to pulling everything but one column that I just want the sum for all records in one table.
Here is the code I have written:
SELECT PM.PMPART, PM.PMDESC, PM.PMSUBF, PCRTL.PRRTL, SUM(int(ISP.ISSTOH)) AS TAVAIL FROM PM, PCRTL, ISP WHERE PM.PMPART = @pNum and PM.PMPCLS IN ('43','45') and PCRTL.PRPART = PM.PMPART and ISP.ISPART = PM.PMPART
However anytime I use SUM() around a field, it causes an error.
Can anyone help?