I am trying to change a "Y" to an "N" in a column. I have already changed that value in several rows, but one specific row is throwing the error.
Here is the error:
The data in row 170 was not committed.
Error Source: .Net SqlClient Data Provider.
Error Statement: String or binary data would be truncated.
The statement has been terminated.
What is it about this row that is causing this error?
3条答案
按热度按时间zqdjd7g91#
Changing a 'Y' to an 'N' shouldn't cause a problem.
Check the Table for a Trigger that might be sending data to another Table where the Truncate is occurring on another Field.
9gm1akwq2#
One solution would be to use a query to update the value instead of (I'm guessing) the edit rows designer in SSMS.
e.g. If your table was
tbl
, the column wascol
, and your primary key wasid
and that value was 170.ncgqoxb03#
Had the same error when inserting text into a TEXT column.
Changed it to VARCHAR(MAX) and the problem was gone.
Using an insert command to insert the exactly same text worked in both cases.. at least for me.