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 gone bad

Status
Not open for further replies.

scottshiv

MIS
Sep 13, 2002
47
0
0
US
I am trying to delete records in [Tile Undup work] based on SSN match to SSN in [Title SSN Match]. Access will let me delete all of the records but when I add the join I get an error that says Could not delete from specified tables. What am I doing wrong?


DELETE [Tile Undup work].*
FROM [Tile Undup work] INNER JOIN [Title SSN Match] ON [Tile Undup work].SSN = [Title SSN Match].[Title SSN];
 
I stumbled across this and it worked.

1. Open the properties window on the query in design view.

2. If the 'Unique Records' property is set to No. set it to yes.

I did the above and my query worked.

Leslie, thank you for the alternative solution.
 
In fact, your SQL should now be:
DELETE [!]DISTINCTROW[/!] [Tile Undup work].*
FROM [Tile Undup work] INNER JOIN [Title SSN Match] ON [Tile Undup work].SSN = [Title SSN Match].[Title SSN];

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

Part and Inventory Search

Sponsor

Back
Top