Hi team,
I am working on sqlserver ,i want to filter the date condition in select case where condition
in the sql server stored procedure,
i tried in the below query but i am getting exception:
An unexpected token ">=" was found following "". Expected tokens may include: "ELSE WHEN END OVER CON
my querySelect * from OPENQUERY(DB2TEST ,'SELECT distinct tlf.* FROM TESTDB2 .TLEXP tlf
where tlf.VEH_SER_NO IS NOT NULL AND
( CASE WHEN tlf.OPN_STS_CD=''CAN'' THEN date(tlf.CANC_DATE ) >= date(''2018-03-18'')
else date(tlf.TS_ISS) >= date(''2018-03-18'')
end )
order by tlf.TS_ISS desc')

Jayesh AgrawalRank #707 · 3.4K reputationPosted Mar 28, 2018, 8:08 AM EDT
Sankara Krishnan VenugopalRank #833 · 2.7K reputationPosted May 14, 2018, 1:59 AM EDT