I'm trying to come up with a Select
statement that would return the DATE
column minus the number of days in the DAYS
column.
This is the query I tried:
SELECT
DATEADD(DAY, -+(REPLACE(ISNULL(DAYS,0), 'DAYS', '')), DATE)
FROM
T
It throws an error
Operand data type varchar is invalid for minus operator