0
I’m using the following case:
CASE WHEN RESPOSTA.CD_RESPOSTA = 1 THEN 'ATENDE'
WHEN RESPOSTA.CD_RESPOSTA = 2 THEN 'NÃO ATENDE'
ELSE 'NÃO APLICÁVEL' END AS DS_RESPOSTA
I have the value of ANSWER.CD_RESPOSTA: 2. The field is an Int, not null.
But it is always returning 'NOT APPLICABLE'. What I am doing wrong?
We would have to see the query where you are using. To answer this without seeing the full scenario would only be based on kick. If it is to kick:
RESPOSTA
can benull
.– Diego Rafael Souza
Are you using Azure or is local?
– Wilson Faustino
Your query is ok if it is only what you displayed. Check if you have values equal to 1 or 2 and if the
where
of your query is not wrong, see an example working: http://sqlfiddle.com/#! 18/90e9d/2– Caique Romero