I am trying to perform the following query in SQL server:
declare @queryWord as nvarchar(20) = \'asdas\'
SELECT * FROM TABLE_1
WHERE (ISDATE(@queryWord) =
It can be "simulated" with a CASE
statement. But you have to make the first condition giving a TRUE
value to avoid checking of the 2nd condition :
declare @queryWord as nvarchar(20) = 'asdas'
SELECT *
FROM TABLE_1
WHERE (CASE
WHEN ISDATE(@queryWord) = 0 THEN 0
WHEN TABLE_1.INIT_DATE = CONVERT(Date, @queryWord) THEN 1
ELSE 0 END) = 1