Within Case in SQL it is not possible to generate a column with numeric and text values as a single answer.
That is, in your code if the VALUE is greater than 0 it generates a numeric result and if less than 0 generates a text value.
I thought of 2 possible solutions:
1- Generate a separate column from the value column:
SELECT
VALOR,
CASE WHEN VALOR > 0 THEN
"Com Valor" ELSE
"Não tem"
END AS NOMECOLUNA
FROM BLABLABLA
2-Generate output with text values for all cases (convert number to text):
SELECT CASE WHEN VALOR > 0 THEN
Put(VALOR, "numero de caracteres") ELSE
"Não tem"
END AS NOMECOLUNA
FROM BLABLABLA
Thanks man! That’s right! I was trying to put the cast in the validation, but I should put in the answer.
– Thiago Pereira