Hi @Analyst_SQL ,
We recommend that you post CREATE TABLE statements for your tables together with INSERT statements with sample data, enough to illustrate all angles of the problem. We also need to see the expected result of the sample.
I also found that your E_Date was in 2020 while your condition was less than one date in 2021. Please double check the years.
You could have a try with below:
where E_Date<'2020-03-01'
Or:
where E_Date<cast('2020-03-01' as date)
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.