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 would receive 0 and when it was greater than 10 received as I did today, could you help me? I do not know if I should use an if or how best, thank you.