I am trying to compare a date in SQL and create a new field so that I can group the results by Todays date and another date (s). I convert both dates to CHAR. However, I get an expression error next to = and). This is for the SSRS report.
There is a rather complicated SQL statement, and I'm just trying to add this extra statement to help with grouping.
Here is an example.
Case WHEN Convert (Char (8), FieldDate, 103) = Convert (Char (8), GetDate (), 103) Then tmpDate = '1' ELSE tmpDate = '0' END
This leads to incorrect sntax near '=' This leads to incorrect sntax near ')'
thanks
source share