DELETE RECORDS

V

Van T. Dinh

Try the following untested SQL String:

DELETE *
FROM Table1 AS T1
WHERE EXISTS
(
SELECT * FROM Table2 AS T2
WHERE T2.[cust part] = T1.[cust part]
AND T2.[material code] = 'G'
)

HTH
Van T. Dinh
MVP (Access)
 
J

JUAN

Hello,
Thanks Denny and Van. Will take advise and see how it
goes. I really appreciate the help.


Juan
-----Original Message-----
Try the following untested SQL String:

DELETE *
FROM Table1 AS T1
WHERE EXISTS
(
SELECT * FROM Table2 AS T2
WHERE T2.[cust part] = T1.[cust part]
AND T2.[material code] = 'G'
)

HTH
Van T. Dinh
MVP (Access)


-----Original Message-----
Hello,
I have two tables and I want to delete records from one
table where the part number from both parts match.
Here's what I have:
Table one table two
cust part cust part
Actual part material code

so I want to delete parts from Table one where the cust
part match and only those parts with material code G.

any info would be very helpful.

thanks,
juan

.
.
 

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