A Repasky

A Repasky

  • NA
  • 231
  • 183.2k

Where clause CASE statement

Jun 27 2013 4:53 PM
I was given pseudo code for a check to see if a date is between a stat date and end date and using a CASE statement change the end date to 99999999 if it is 0.  I need to check if the date is in a 3 year range.  I am not an expert on CASE statements and never used one in a Where clause before.  This is enrollment info.  Here is the code and I hope someone can help me out.


WHERE EligibilityHistory.CoverageGroupCode = '010218'





AND 20100601 between EligibilityHistory.EligibilityStartDateAND EligibilityHistory.EligibilityEndDate
 
Case When End = 0 then 99999999 Else End

Thanks to anyone that can help.  I am not sure if this is the way to go, but I have to try.

arep

Answers (1)