473,804 Members | 3,446 Online
Bytes | Software Development & Data Engineering Community
+ 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_Except ions 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 7652
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_Excep tions 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******** *************** ***********@d21 g2000prf.google groups.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_Except ions 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
8795
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. But in my c++ book is says that the postfix L forces the integer to be signed.
2
13853
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 give differences? Say, i've got 2 tables - no keys defined on them. No PK and UK. Now MINUS operator will pick which columns for comparison? Having a PK/UK, i see it as comparing these keys and susequently the rest of fields for matcing key records,...
4
5297
by: mpayne | last post by:
I tried obj.style.background-image, and got the error "'image' is undefined". Thanks Martin
7
8876
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6607
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 where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
13
5101
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 touched the standards a year ago, though I graduated in embedded SW development... Anyway, to the problem at hand: I've stumbled upon the following construct at work recently, and cannot really make up my mind about the standard's take on the matter.
6
2592
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 example: #include <iostream> using namespace std; class Object { public:
1
4374
by: mymurali24 | last post by:
i need synat for minus operator in my sql
2
10010
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 make use of minus in access
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.