hello how can i work with parameters, working with case, sum etc... instructions? For example i have these lines that select some values, these values i want to store in a parameter because i want to SUM those fields after.... how is the better way to do this? CASE WHEN SUM(CASE WHEN A.TYPE_MOV = 1 THEN A.VALUE_MOV * -1 ELSE A.VALUE_MOV END) > 0 THEN SUM(CASE WHEN A.TYPE_MOV = 1 THEN A.VALOR_MOV * -1 ELSE A.VALUE_MOV END) ELSE 0 END AS VALUE_RECEIVE,CASE WHEN SUM(CASE WHEN A.TYPE_MOV = 1 THEN A.VALUE_MOV * -1 ELSE A.VALUE_MOV END) < 0 THEN SUM(CASE WHEN A.TYPE_MOV = 1 THEN A.VALUE_MOV * -1 ELSE A.VALUE_MOV END) ELSE 0 END AS VALOR_PAY,
----z-----