December 11, 2006 at 12:06 pm
SELECT DISTINCT POLICYNUMBER WHERE STATUS='A' AND MonthReported < DATEADD(year,EffectiveDate,10)
Lowell
December 11, 2006 at 12:13 pm
SELECT DISTINCT PolicyNumber
from GE_Transaction
WHERE Status='A' AND MonthReported < DATEADD(year,EffectiveDate,10)
i get the following error
Server: Msg 8116, Level 16, State 1, Line 1
Argument data type datetime is invalid for argument 2 of dateadd function.
December 11, 2006 at 12:17 pm
SELECT DISTINCT PolicyNumber
from GE_Transaction
WHERE Status='A' AND MonthReported < DATEADD(year,10,EffectiveDate)
i reversed the argument;
i don't know that MonthReported is a valid date, you'll have to evaluate with data to see if this is valid.
Lowell
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply