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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specify the table containing the records you want to delete

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
Good morning, I had some SQL that did what I wanted but couldn't find it so started again.

Basically, this gives the above error message:
Code:
DELETE Passwords_Not_Used.Password
FROM Passwords_Not_UsedINNER JOIN Sample_0_All ON Passwords_Not_Used.Password = Sample_0_All.Password;

But this provides the solution:

Code:
DELETE Passwords_Not_Used.Password
FROM Passwords_Not_Used 
WHERE Passwords_Not_Used.Password IN
(SELECT Sample_0_All.Password
FROM Sample_0_All);

Many thanks,
D€$
 
It's supposed to be a tip. [smarty]

Many thanks,
D€$
 
FROM Passwords_Not_Used[highlight] [/highlight]INNER JOIN Sample_0_All

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top