Quantcast
Viewing all articles
Browse latest Browse all 10045

Result of Calculated Field as Criteria?

I'm using CASE and CAST to convert a field to datetime format so that I can account for null field values

CASE

     WHEN ISDATE([Date])=0 THEN 01/01/1900

     ELSE

         CAST([Date] as datetime)

END as [DateConverted]

How can I use this new [DateConverted] field in the criteria of my query so that I can only get records in a specific date range?


Viewing all articles
Browse latest Browse all 10045

Trending Articles