Introduction
Controls the way the column stores values shorter than the defined size of the column, and the way the column stores values that have trailing blanks in char, varchar, binary, and varbinary data.
SET ANSI_PADDING ON– preserves the trailing blanks in the string values when they are inserted into a column. This is ANSI-compliant behavior.SET ANSI_PADDING OFF– trims the trailing blanks in the string values when they are inserted into a column. This is not recommended behavior.
Problem
Enable ANSI_PADDING
Solution
Based on
https://www.madeiradata.com/post/what-is-ansi_padding-and-why-we-should-use-it