The request is 2 part:
Records should fall off report _*If the Record has expired AND if *_
RecordStatus != 'Funded'
.Records should stay on the report _If
RecordStatus = 'Funded'
*, has no *PURCHASEDATE
, and if the Record has expired (is in the past from **currentdate
).
I've tried to do this with CASE
but this request appears to be boolean logic therefore, impractical. I've tried to looking into IF...THEN...ELSE
but I'm lost as how to do it. I've spent 2 full days trying to get this to work and I've come up with nothing. Is there anyone out there that an assist me with this and then explain it?
Below is a simple example of failure (and yes, I full understand this fails due to a condition, not an expression):
Select distinct ...
from ... --with joins
where ...
and case when RecordStatus != 'Funded' then getdate() <= EXPIRATIONDATE else ?? end
Thank you!!