I want to convert a datetime variable in SQL-Server to string and compare it with an empty string:
CONVERT(varchar(20), @DATEDEB, 1) =''
This is the test I have in my code:
IF (@N_CATComp = 4) AND (@EXON='' OR CONVERT(varchar(20), @DATEDEB, 1) ='' OR CONVERT(varchar(20), @DATEFIN, 1) = '')
the test works even if datedeb and datefin empty