SQL criteria for deleting one table from another

G

Guest

Thanks very much for your response to my 1/20 question. This a follow-up to
that question, how to delete one table, "table one," from another table,
"table two," and your response.

I need help with the SQL set-up, i.e. Please explain the SQL terminology of
how to add the tables and for set-up of the

"Delete from [table two] where [table one = mnemonics]. The essense of this
query is to delete duplicate records in table one.

Thanks again

Quan
 
M

[MVP] S.Clark

If you use the UI, then you will not need to understand the native SQL code.
If you would like to learn more about the SQL Code, please visit MSDN or the
Access Help file. There are several books on the topic as well.

Here is a sample:

DELETE Orders.*
FROM Customers
INNER JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
WHERE (((Customers.Region)="East Coast"))

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

Quan said:
Thanks very much for your response to my 1/20 question. This a follow-up
to
that question, how to delete one table, "table one," from another table,
"table two," and your response.

I need help with the SQL set-up, i.e. Please explain the SQL terminology
of
how to add the tables and for set-up of the

"Delete from [table two] where [table one = mnemonics]. The essense of
this
query is to delete duplicate records in table one.

Thanks again

Quan


[MVP] S.Clark said:
With a Delete query, you can add two tables to it, link them, then
specify
the "From" table, which is where the records will be deleted, and the
"Where" table, which contains the criteria for the delete.

So, create a query as you would normally, add the tables, then link them.
Change the query to a delete query (Query / Delete from the main menu),
then
specify your From and Where tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top