Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

MERGE failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'.

$
0
0

I turned off ANSI_WARNINGS to insert 'Large' size data into a 'smaller' column. Now I couldn't get the MERGE statement working anymore, fails with the following error.

MERGE failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

What are my options to fix "String or binary data would be truncated." error other than setting ANSI_WARNINGS OFF? I know I may reset data to match with the target column length before inserting. Is there anything else I can do?

Thanks.


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>