If I run the following SELECT statement it works until the "OR". It returns selected unit, accepted, notification, and OutageType = U1. If I add the "OR", then it also returns anything (different units, ones that are not accepted) that has a OutageType = U2.
SELECT *
FROM(Events)
WHERE(Unit = '" & Unit.Text & "')
AND (Accepted = '" & Accept & "')
AND (Notification = '" & Notify & "')
AND (OutageType = '" & OutageU1 & "')
OR (OutageType = '" & OutageU2 & "')
ORDER BY ID DESC"
Any ideas on fixing this so I get only the OutageType that meets the Unit, Accepted, Notification criteria?
I trade stars for help!
Thanks,
Chilly442
SELECT *
FROM(Events)
WHERE(Unit = '" & Unit.Text & "')
AND (Accepted = '" & Accept & "')
AND (Notification = '" & Notify & "')
AND (OutageType = '" & OutageU1 & "')
OR (OutageType = '" & OutageU2 & "')
ORDER BY ID DESC"
Any ideas on fixing this so I get only the OutageType that meets the Unit, Accepted, Notification criteria?
I trade stars for help!
Thanks,
Chilly442