Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 797
  • Last Modified:

Could not delete from specified tables

Hello,

I am receiving "Could not delete from specified tables" error when using this code.  Appreciate the help.

DELETE [Assignment - Deployed].*, [Project List].[Project Status]
FROM [Assignment - Deployed] INNER JOIN [Project List] ON [Assignment - Deployed].[Project ID] = [Project List].[Project ID]
WHERE ((([Project List].[Project Status])="Complete"));
0
dustywork
Asked:
dustywork
2 Solutions
 
als315Commented:
Is [Project List].[Project ID] key field?
 
0
 
dustyworkAuthor Commented:
Yes.  Project ID is a key field in the Project List table.
0
 
Lee-HCommented:
Do you have enforce referential integrity enabled on your relationships?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Rey Obrero (Capricorn1)Commented:
try this


DELETE [Assignment - Deployed].*
FROM [Assignment - Deployed], [Project List]
Where [Assignment - Deployed].[Project ID]
  IN (select [Project ID] from [Project List]
WHERE [Project Status]="Complete")
0
 
rockiroadsCommented:
your delete query contains multiple tables. if just deleting from one table then specify just that or try the UniqueRecords setting http://support.microsoft.com/kb/240098/en-us
0
 
dustyworkAuthor Commented:
Thanks to you both as I needed both to get to the solution.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now