I want to set 2 different where conditions depending on the value of a variable, that is:
if @var=0 then Where fieldFecha='1900/01/01' and if @var=1 then where fieldfecha<>'1900/01/01'
DECLARE @var int
SET @var=0
SELECT * FROM Table
WHERE fieldFecha=CASE ?????
I don't know what to put in the CASE
because I need to use fieldFecha= and fielFecha<>
Any idea please?
Regards