'SQL Computed Column Case with Multiple Criteria
I'm having trouble using Case statement for multiple criteria, I don't know how to nest another CASE.
DateTime
column:Control_OpenDateOwner
DateTime
column:Control_ClosedDateRev
Computed column:
(case when [Control_ClosedDateRev] IS NULL then '1' else '0' end)
Trying to I want to calculate when the OPENDATE
is greater than 4 Days opened (using today()
) and the close date is Null, put a 1
(open record and has more than 4 days opened or 0
if the record is closed or less than 4 days opened, I can't get it to work.
Why?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|