473,466 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 7625
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andrew Ward | last post by:
Hi All, I tried to compile the following line: pair<long, ulong> cr3(make_pair(-2147483648L, 2147483647)); but get this error: unary minus applied to unsigned type, result still unsigned. ...
2
by: Newbie | last post by:
Hi, Could someone please tell how MINUS operator works for comparing and giving non-matching records in Table1? Does MINUS operator compares all records of Table1 with all records of Table2 to...
4
by: mpayne | last post by:
I tried obj.style.background-image, and got the error "'image' is undefined". Thanks Martin
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
13
by: Marc | last post by:
Hi, I've been lurking on clc for a few months now, and want to start by thanking the regulars here for opening my eyes to a whole new dimension of "knowing c". Considering I had never even...
6
by: Matthew Cook | last post by:
I would like to overload the unary minus operator so that I can negate an instance of a class and pass that instance to a function without creating an explicit temporary variable. Here is an...
1
by: mymurali24 | last post by:
i need synat for minus operator in my sql
2
by: Shalini Bhalla | last post by:
I want to extract records form a table . I have Table A and Table B . I want to extract unmatching records from table A to table B .... Can you Please tell me how to extrat it ? How to...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.