Skip to Main Content

fdmAPI.executeQuery - return Select SUM

kafka89Sep 27 2019 — edited Sep 28 2019

Hi All,

I have an issue similar to the one sorted here -

The difference is that I need to output sum of Amount into variable.

Can someone help

  try:

        sqlQuery = "SELECT SUM(TDATASEG_T.AMOUNT) FROM TDATASEG_T WHERE TDATASEG_T.LOADID = ? "

        loadId = fdmContext["LOADID"]           

        params = [loadId]            

        rs = fdmAPI.executeQuery(sqlQuery, params)

        var1 = ???

        fdmAPI.logInfo(str(var1))

        fdmAPI.closeResultSet(rs)

    except Exception, err:

        fdmAPI.logError("Something went wrong" + str(err))

This post has been answered by JohnGoodwin on Sep 28 2019
Jump to Answer
Comments