That error was caused by the OR statement, used withouth parenthesis.
Try this:
Select intTaskId, dtNotification, dtCompleteTask,
from tblPermTask
where dtCompleted IS NULL and
(intElevated IS NULL or
intElevated = 1) and
dtCompleteTask < getdate() and
intFilterId = 32
Main Topics
Browse All Topics





by: billmercerPosted on 2009-10-27 at 10:14:52ID: 25674926
maybe put parentheses around the OR elements?