Hi @pmscorca,
It is an old SQL Server behavior that was fixed in latest version(s) without any trickery.
Check it out few solutions here: https://www.brentozar.com/archive/2019/03/how-to-fix-the-error-string-or-binary-data-would-be-truncated/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm working on a SQL Server 2017 (RTM-CU31-GDR) instance and I'm testing an INSERT INTO ... SELECT ... FROM ... statement that unfortunately causes a "string or binary data would be truncated" error.
If possible, I'd like to save development time trying to detect which field/value causes this error in a simple and automatic manner without checking each field.
So, I've tried to use the clause OPTION (QUERYTRACEON 460) but it doesn't return any helpful additional message to detect the wrong field/value.
Any suggests to me, please? Thanks
Hi @pmscorca,
It is an old SQL Server behavior that was fixed in latest version(s) without any trickery.
Check it out few solutions here: https://www.brentozar.com/archive/2019/03/how-to-fix-the-error-string-or-binary-data-would-be-truncated/