469,950 Members | 2,067 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

access accepts the MINUS operator

Hello everybody i'm trying to use the minus operator like that:
(SELECT DISTINCT TRIM(S.Lname & ', ' & Fname) AS Name, S.SID
FROM Salesperson as S,
Schedule as H
WHERE S.SID = H.SID
AND H.Day = 4
AND H.AM = 0
AND H.PM = 0
AND H.Ev = 0)
MINUS
(SELECT DISTINCT TRIM(S.Lname & ', ' & Fname) AS Name, S.SID
FROM Salesperson as S,
Schedule_Exceptions AS E
WHERE S.SID = E.SID
AND #2008-02-04# BETWEEN E.IniDate AND E.FinDate
AND E.Validity = '1')

Then i get an error that says: Syntax error in union query.

May somebody helpme. Thanks
Feb 7 '08 #1
2 7394
Alas, Access does not support anything other that Union.

Tim Mills-Groninger

On Feb 7, 10:45*am, CenturionX <darwinbaldr...@gmail.comwrote:
Hello everybody i'm trying to use the minus operator like that:
(SELECT DISTINCT TRIM(S.Lname & ', ' & Fname) AS Name, S.SID
FROM Salesperson as S,
* * * Schedule as H
WHERE S.SID = H.SID
* AND H.Day = 4
* AND H.AM = 0
* AND H.PM = 0
* AND H.Ev = 0)
MINUS
(SELECT DISTINCT TRIM(S.Lname & ', ' & Fname) AS Name, S.SID
FROM Salesperson as S,
* * *Schedule_Exceptions AS E
*WHERE S.SID = E.SID
* *AND #2008-02-04# BETWEEN E.IniDate AND E.FinDate
* *AND E.Validity = '1')

Then i get an error that says: Syntax error in union query.

May somebody helpme. *Thanks
Feb 7 '08 #2
You can likely do what you want with the NOT IN operator and a Subquery in
the WHERE clause. Search on Access and Subquery... and you will find a good
deal of information, some part of which is likely to be pertinent.

Larry Linson
Microsoft Office Access MVP

"CenturionX" <da************@gmail.comwrote in message
news:f6**********************************@d21g2000 prf.googlegroups.com...
Hello everybody i'm trying to use the minus operator like that:
(SELECT DISTINCT TRIM(S.Lname & ', ' & Fname) AS Name, S.SID
FROM Salesperson as S,
Schedule as H
WHERE S.SID = H.SID
AND H.Day = 4
AND H.AM = 0
AND H.PM = 0
AND H.Ev = 0)
MINUS
(SELECT DISTINCT TRIM(S.Lname & ', ' & Fname) AS Name, S.SID
FROM Salesperson as S,
Schedule_Exceptions AS E
WHERE S.SID = E.SID
AND #2008-02-04# BETWEEN E.IniDate AND E.FinDate
AND E.Validity = '1')

Then i get an error that says: Syntax error in union query.

May somebody helpme. Thanks

Feb 11 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Andrew Ward | last post: by
2 posts views Thread by Newbie | last post: by
4 posts views Thread by mpayne | last post: by
13 posts views Thread by Marc | last post: by
6 posts views Thread by Matthew Cook | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.