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

Home Posts Topics Members FAQ

MS Access Query - specify table i want to delete from

14 New Member
i am getting an error try to run query:

Expand|Select|Wrap|Line Numbers
  1. DELETE *
  2. FROM tblExceptions INNER JOIN tblTemp3 ON tblExceptions.ExceptionKey=tblTemp3.ExceptionKey
  3. WHERE (((tblExceptions.ExceptionLevel)=0));
it says to specify table to delete from?
Oct 6 '10 #1
2 1812
dsatino
393 Contributor
I don't think you can use the * with DELETE queries that have a JOIN because both tables have a * option.

Your query doesn't specify which tables * you want to delete.

You could try to modify the SQL to DELETE tblExceptions.*

But I have no idea whether Access will recognize what you are trying to do
Oct 6 '10 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Essentially you can't use a delete query on a query with a join like this. Try this instead ..

Expand|Select|Wrap|Line Numbers
  1. DELETE * FROM tblExceptions
  2. WHERE ExceptionKey=DLookup("[ExceptionKey]","tblTemp3","[ExceptionLevel=0");
Oct 6 '10 #3

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

Similar topics

2
by: Dave Burt | last post by:
Hi, Access officionados, I'm new here, so please cut me slack/gently tell me off if I'm out of line or in the wrong place. OK, here's something that seems silly (and is also problematic to...
8
by: John Baker | last post by:
Hi: Access 2000 W98! I have a table with numerous records in it, and am attempting to delete certain records that have been selected from it. These are selected based on the ID number in a...
14
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I...
4
by: darrel | last post by:
I'm still struggling to find out why I keep getting Invalid object name 'monkey'. errors. Below is my try/catch statement. Note the first query is trying to delete a record in the table...
3
by: D | last post by:
Hello everyone - General question. How would I create a SQL code in ASP that will insert selected records into a new table, and then delete those same records from the original table in one...
1
by: rdemyan via AccessMonster.com | last post by:
I'm getting an error on the following delete query, which says to "specify the table containing the records you want to delete." Here's the delete action query sSQL = "DELETE * FROM As A LEFT...
3
by: austin1539 | last post by:
I am trying to run an Access query from Excel. The query, called "ProdActs1" works in Access and is run from using information from a table called "Queries". When a button is clicked in Excel, data...
3
by: rn5a | last post by:
I am trying to delete records from a MS-Access DB table using the following query: strSQL=DELETE FROM MyTable WHERE =CInt(Request.QueryString("delete")) con.Execute strSQL When I run the app...
3
topher23
by: topher23 | last post by:
I have a query that isn't working as expected. The query links to one table used for data entry and has outer joins on two tables used to display information based on choices entered. I can...
2
by: mburns | last post by:
Hello all- I was wondering if it is possible to link an Access query or table to a Word document and pull specific information into Word by manually entering a unique identifier, which would then...
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
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,...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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.