In my stored proc, I'm trying to set/pass a datetime variable to NULL. Then I want to check if that variable is NULL. if yes then do A else do B. For some reason even though the value of the variable appears to be NULL it's evaluting the the NULL as false.
here's my code
spTest (@currentDate datetime, @BegDate datetime=NULL, @EndDate datetime =NULL)
Select * From TableA Where EntryDate Between @BegDate and @EndDate
Select * From TableA Where EntryDate Between @CurrentDate and @EndDate