When doing db joins using C#, case and padding matter whereas in SQL
server it doesn't. Therefore as part of the transition to LinQ we need to clean up this mismatch, as FK's that don't match their related PK's will cause inconsistent comparisons (joins which should match that don't anymore when using C#). This script is indentifying the top 20 mismacthes (to help readability) that are not deemed as a mismatch in SQL server. Be wary of the NOT NULL CHAR columns because even though ANSI Padding might be set to OFF for thse column's properties, they will be padded to their column width.
HOW TO USE :
Copy content of the script into a query editor, choose a db and then hit execute.
- The underscore in the results demonstrates that there is a blank space in that result.
- Other results displayed are due to case differences i.e. 'A' does not equal 'a'
- (NP) represents that that column has ANSI Padding set to OFF
- (P) represents that that column has ANSI Padding set to ON