I want to calculate the number of days remaining in the month and add to a decimal field and then use as a filter in DB2.
DECLARE @EDate date
SET @EDate = GETDATE();
SELECT DAY(EOMONTH(@EDate )) AS DaysInMonth
SUM(a.DYS_PAST_DUE + DaysInMonth) as DPD
FROM schema.table a
WHERE SUM(a.DYS_PAST_DUE + DaysInMonth) >= 60