I'm doing a query in sqlsrv 2000, to several tables where there are two fields estado
and estado2
(that do the same thing, I do not know why they did it that way) that they keep 0
and 1
.
I currently have a case in that part of the query so that when state is equal 0, then estado='NO'
, and if it is 1 then estado='SI'
. I JUST ASK QUESTION FOR THE FIELD estado
, and I need to ask if at least one of the two has a value of 1 or 0 without adding a new column to the query.
This is the part of the query that I have:
CASE a.estado
WHEN 1 THEN 'SI'
WHEN 0 THEN 'NO'
END AS Estado
I hope you understand me.