Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

null date in query

9 views
Skip to first unread message

mcnewsxp

unread,
Mar 26, 2013, 2:46:55 PM3/26/13
to
how code this correctly so I don't get this error: "Arithmetic overflow error converting expression to data type datetime." I know it's here: "GETDATE() - C1.Notice1Date" because notice1date will be null on some rows.

WHERE
(((GETDATE() - C1.IssueDateTime) > 7) AND (C1.Notice1Date IS NULL))
or
((C1.Notice1Date is not null)
and (((GETDATE() - C1.Notice1Date) > 7) AND (C1.Notice2Date IS NULL)))

mcnewsxp

unread,
Mar 26, 2013, 2:57:04 PM3/26/13
to
I ended up using a union all query
0 new messages