Syntax - Grouping
The following is my code:
SELECT CallNumber, LogDatTim, FirstName, LastName, CallSubject1 AS Service, CallSubject2 AS Category, CallSubject3 AS Item
FROM dbo.Call
WHERE (LogDatTim >= @fromDate + ' 00:00') OR
(CallSubject3 = 'User Leaving') OR
(CallSubject3 = 'Disable Future') OR
(CallSubject3 = 'Disable Now')
ORDER BY LastName, FirstName
I need it to choose the LogDatTim first from a criteria window - eg 1/10/2005 and bring up any of the CallSubject3 within that time.
what it seems to be doing is picking up all calls after 1/10/2005 as well as any calls with CallSubject3 - eg I am also collecting 2002 calls with the subject in.
I did try an AND before the first CallSubject but that didn't help either.
How do I bracket this please.
thanks

