|
Hello, I have a SQL server database which contains different tables, one of its table's rows cannot be deleted. I don't know what is the problem, I checked table properties and server roles too. I want to mention that some of its rows are used in views.
Correct the errors and attempt to delete rows again or press ESC to cancel the change(s)
(comments are locked)
|
|
It sounds like you're relying on the data tool to handle the deletes but your data has duplicates which is preventing the data tool from completing the operation. I think sp_lock has it nailed, you don't have a primary key on this data.
(comments are locked)
|
|
Have you tried deleting with a manually typed delete statement instead of through the GUI? The one time I have seen an error like that was when I was deleting rows through the gui that another developer had modified by t-sql command. (Just to be clear, this was setting up test data on a test server. I generally would not recommend using the GUI to make changes in production, especially on a system with many users.)
(comments are locked)
|
|
Are the views created with schemabinding?
(comments are locked)
|
|
To add to what has already been said and asked.... There are various reasons why you may not be able to delete, or the result of a delete MAY not appear to have worked, including triggers, constraints, permissions, errors etc. You really need to post both the method by which you are trying to delete (i.e. the SQL) and any resulting error messages or completion messages. This will then help us to help you.
(comments are locked)
|
|
Are you trying this via SSMS? Silly question...Does the table have a Primary key?
(comments are locked)
|


Posting the error message you get is a must, really.
Do you get referential error?