I am very new to T-SQL and am looking to simplify this query using isnull.
case
when datediff(d, appdate, disdate) IS NOT NULL THEN datediff(d, appdate, disdate)
ELSE
Case
when appdate is null THEN datediff(d,update,getdate())
when disdate IS NULL THEN datediff(d,appdate,getdate())
END
END