Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Records problem 1

Status
Not open for further replies.

BrenoAguiar

IS-IT--Management
Feb 8, 2005
81
US
I'm trying to delete some records from my table "Btable" that has the same field [street] value in another table "owners".

I tried:

Delete *
From Btable
WHERE Btable.street=Owners.street

and also

Delete *
From Btable Inner join owners ON btable.street = owners.street
WHERE Btable.street=Owners.street

But I'm getting errors saying that I'm supposed to specify the table to have the records deleted and when I specify its says it can't delete the records from the table.

Any help?
 
DELETE FROM Btable
WHERE street In (SELECT street FROM Owners)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top