Comparing Views and Trailing Blanks in varchar columns
Brian Donahue
Posts: 6,590 Bronze 1
Hi Darias,
Data Compare will flag varchar data with leading/trailing spaces as different. That may not be desirable in some cases, but we are being 'faithful' to the data.
To get Data Compare to be able to compare views, they need to have a unique index defined. That puts some conditions on the view such as the need to have the same owner as the underlying table and schemabinding. You'll be told what to do if you design the view in Enterprise Manager and go to the Manage Indexes section of the view designer.
Data Compare will flag varchar data with leading/trailing spaces as different. That may not be desirable in some cases, but we are being 'faithful' to the data.
To get Data Compare to be able to compare views, they need to have a unique index defined. That puts some conditions on the view such as the need to have the same owner as the underlying table and schemabinding. You'll be told what to do if you design the view in Enterprise Manager and go to the Manage Indexes section of the view designer.
This discussion has been closed.
Comments
There is no option to ignore white space, but we'll certainly look into it. One option would be to synchronize the tables' different records. Data Compare will pad the data identically with spaces as in the source.