Timeline for "String or binary data would be truncated" error copying nvarchar(10) to char(10)
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 11, 2015 at 15:28 | comment | added | Solomon Rutzky |
Did using LEFT(field, 10) actually fix the issue? That should not have done anything to fix this. There could be something else going on. Can you please let us know what the collations of both source and destination fields are?
|
|
Dec 11, 2015 at 11:54 | vote | accept | user5664489 | ||
Dec 11, 2015 at 11:54 | comment | added | user5664489 | Thanks. Indeed a very detailed answer. As a quick solution while i am inserting the values from Col1 nvarchar(10) to char(10) i have explicitly used left(col1,10) in the insert script just to make sure exact string length only gets inserted , in case there are any invibile Unicode characters or spaces exits in source column. | |
Dec 10, 2015 at 20:22 | history | edited | Solomon Rutzky | CC BY-SA 3.0 |
Added spoiler section at the top ;-)
|
Dec 10, 2015 at 19:37 | history | edited | Solomon Rutzky | CC BY-SA 3.0 |
added 55 characters in body
|
Dec 10, 2015 at 19:18 | history | edited | Solomon Rutzky | CC BY-SA 3.0 |
added 169 characters in body
|
Dec 10, 2015 at 18:59 | history | edited | Solomon Rutzky | CC BY-SA 3.0 |
added most of the example code
|
Dec 10, 2015 at 18:35 | history | edited | Solomon Rutzky | CC BY-SA 3.0 |
added most of the example code
|
Dec 10, 2015 at 18:23 | history | answered | Solomon Rutzky | CC BY-SA 3.0 |