473,472 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Delete Query Access2000

1 New Member
Help, i'm new to this.
I'm trying to run a delete query in Access 2000 and the error message i get is: 'Could not delete from specified tables'

I want to delete ProductMaster.[PART NO] that does not exist in [FINAL MASTER].[PART NO], what have i done wrong?


The SQL for the query is:
SELECT ProductMaster.*, [FINAL MASTER].[PART NO]
FROM [FINAL MASTER] RIGHT JOIN ProductMaster ON [FINAL MASTER].[PART NO] = ProductMaster.[PART NO]
WHERE ((([FINAL MASTER].[PART NO]) Is Null));
Dec 2 '08 #1
1 1265
ChipR
1,287 Recognized Expert Top Contributor
Try something like this:
DELETE * FROM ProductMaster WHERE NOT EXISTS (SELECT Part_No FROM FinalMaster WHERE ProductMaster.Part_No = FinalMaster.Part_No)

EXISTS examples:
SQL: EXISTS Condition
Dec 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Andrew DeFaria | last post by:
I created the following .sql file to demonstrate a problem I'm having. According to the manual: If |ON DELETE CASCADE| is specified, and a row in the parent table is deleted, then InnoDB...
3
by: Julia Härtfelder via SQLMonster.com | last post by:
Hi All! I need help with a Statement! I am working with an Access2000 DB. I have the following Problem. ChNr Linie Datum Code 39 Stückzahl BHL1 BHL2 BMRH...
3
by: James A | last post by:
I've been searching around for a while now trying to find how I can delete a table through vb. I'm using access2000. I use this to make a table: CurrentDb.Execute "CREATE TABLE " &...
6
by: B Love | last post by:
I am wondering if I can have a dynamically generated report based upon the results of a query (in Access2000). Any ideas? Related to that (if that cannot be done) can the output of a query...
1
by: Mario Crevits | last post by:
My name is Mario Crevits, I'm from Belgium (Roeselare) and I'm working with Access97 for several years now. We are in an Access97-2000 migration project. I'm writing a wizard for the end-users to...
1
by: Simon Harris | last post by:
I'm using Access2000 and I've got a problem with a delete query which I'm *sure* I had working before )-: I have a table (logfile) which I import from an external source that has a load of stuff I...
5
by: KayC | last post by:
Hi I use SQLServer2000 and MS Access2000 I have the below SQL query which will not work as a Access PassThrough Query, I have tried replacing the @COB with a date string but the query hangs...
3
by: Kevin M | last post by:
I have one table and have created a form from that table. Also, I have created a delete query. I want to but a button on the form which will delete all records from the table; however, I cannot get...
1
by: mickymtl | last post by:
In an ASP file using vbscript and JET 4.0: In the Access2000 database the date_added field is set as general date. Why does "SELECT * FROM traffic_log WHERE date_added >= " &...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
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
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,...
1
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.