Click here to Skip to main content
15,889,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am using sql2008 in my project.
In one of my tables one record in 1000 records can not be updated from sql2008 Editing enviroment (In MyTbl Edit Top 200 Row Window) and it makes error, but I can update that record from QueryAnalizer Window (With Sql Commands).

I have no problem with other records in this table.

Can anyone help me with this?
Posted
Updated 15-Nov-10 23:38pm
v2
Comments
JF2015 16-Nov-10 5:39am    
What is the error you are facing?
thatraja 17-Nov-10 0:51am    
Add the error message in your question

You can modify the SQL by right clicking the grid then selecting pane SQL.
Use a where clause to narrow the result set.

I am worried that "I can update that record from QueryAnalizer Window". Please provide code and error message as there may be a problem with what you are trying to do.
 
Share this answer
 
It occurs because when there is no PK or no unique row identification....
Check below example

CREATE TABLE dbo.T
(T VARCHAR(50),
TT VARCHAR(50),
TTT VARCHAR(50)
)

INSERT INTO T
SELECT 'A','AA','AAA' UNION ALL
SELECT 'A','AA','AAA' UNION ALL
SELECT 'B','BB','BBB'

If I want to update the firt value i.e. A it won't allow me from Management Studio coz no unique identification is there....but it will allow me if I modify last one i.e. B

In Queay Analyzer you just provide the criteria which is fine....

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900