Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Cameron Wells,
When doing db joins using C#, case and padding matter whereas in SQLserver 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
Saving query results in Excel with column names
Convert the result set from column wise to row wise
Procedure Result as column data ..Need urgent help
Need help on Getting Result from row to column
Update Datetime Column to Empty String - No Error - Strange Results