SQL simple case statement with formula

Viewed 48

I tried adding in a THEN after the WHEN but don't know how to just make it show up as the result of the formula

CASE
WHEN (PLANAVAILDATE - CURRENT_DATE) =>280
ELSE ''
END AS Days Overdue 
1 Answers

You don't need a case statement for this you can directly count the days of overdue by using this

DATEDIFF(hour, PLANAVAILDATE, CURRENT_DATE)/24 AS 'Days Overdue'

if you can provide the full question I will give you exact solution

Related