Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Where clause CASE statement
A Repasky
Jun 27 2013 4:53 PM
991
Reply
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
.
EligibilityStartDate
AND
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
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Cant login to SQL express?
sql server give this problem ?