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

Delete query Syntax Error

Status
Not open for further replies.

gertNo1

Technical User
Sep 30, 2007
42
0
0
Hi Guys, I'm having a problem with this Delete query but I can't find the error. I tried to match it against queries I found in the Search Archives but I'm still getting a SYNTAX error.

Does anyone see what I'm doing wrong?

DELETE Invalid_Last4_Final_Output.*
FROM Invalid_Last4_Final_Output
where Invalid_Last4_Final_Output.DSLOAN in (Select Invalid_Last4_Final_Output.DSLOAN
FROM Invalid_Last4_Final_Output
INNER JOIN Valid_Zero_AcctNums ON Invalid_Last4_Final_Output.DSLOAN = Valid_Zero_AcctNums.AccountNum
WHERE Invalid_Last4_Final_Output.INLNSF="000000");

Thanx
 
INNER JOIN....WHERE maybe needs to be INNER JOIN ON...?

All I ask is a chance to prove that money can't make me happy.
 
What about this ?
DELETE Invalid_Last4_Final_Output.*
FROM Invalid_Last4_Final_Output
INNER JOIN Valid_Zero_AcctNums ON Invalid_Last4_Final_Output.DSLOAN = Valid_Zero_AcctNums.AccountNum
WHERE Invalid_Last4_Final_Output.INLNSF="000000";

Or this ?
DELETE *
FROM Invalid_Last4_Final_Output
WHERE DSLOAN In (SELECT AccountNum FROM Valid_Zero_AcctNums)
AND INLNSF="000000";

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

Part and Inventory Search

Sponsor

Back
Top