1
SELECT @VL_RET_INSS = SUM(VL_RET_INSS),
@VL_RET_IRRF = SUM(VL_RET_IRRF),
FROM TABELA WHERE VALOR_TABELA > 0
I would like that when the value VL_RET_IRRF was less than 10 the field @VL_RET_IRRF received 0 and when it was greater than 10 received as I did today, could you help me? I don’t know if I should use an if or which way best, thank you.