SQL Server 2012 MSG 4145 I'm trying to upgrade one of our applications and we have to create the database again due to the app now requiring case sensitive collation.  I've created the new DB and run the table creation scripts, but now they give us a SQL to run to compare the table configs between the old and new DB.  I keep getting the error below from using that SQL. I can't figure out if I'm missing something or if there's just a problem with the way I'm running it (SQL Server Management Studio). Can anyone explain what I'm missing?

SELECT
src.TABLE_NAME,
src.COLUMN_NAME,
src.DATA_TYPE,
src.CHARACTER_MAXIMUM_LENGTH,
dst.TABLE_NAME,
dst.COLUMN_NAME,
dst.DATA_TYPE,
dst.CHARACTER_MAXIMUM_LENGTH
FROM originalDB.INFORMATION_SCHEMA.COLUMNS src
INNER JOIN newDB.INFORMATION_SCHEMA.COLUMNS dst
ON dst.TABLE_NAME COLLATE DATABASE_DEFAULT = src.TABLE_NAME COLLATE DATABASE_DEFAULT
AND dst.COLUMN_NAME COLLATE DATABASE_DEFAULT = src.COLUMN_NAME COLLATE DATABASE_DEFAULT
WHERE dst.CHARACTER_MAXIMUM_LENGTH &amp;lt; src.CHARACTER_MAXIMUM_LENGTH
OR dst.DATA_TYPE COLLATE DATABASE_DEFAULT &amp;lt;&amp;gt; src.DATA_TYPE COLLATE DATABASE_DEFAULT;

Msg 4145, Level 15, State 1, Line 14
An expression of non-boolean type specified in a context where a condition is expected, near ';'.
Try this query where I've replaced the &amp;lt; for &lt; and &amp;gt; for &gt;. I hope it will help.

SELECT
  src.TABLE_NAME,
  src.COLUMN_NAME,
  src.DATA_TYPE,
  src.CHARACTER_MAXIMUM_LENGTH,
  dst.TABLE_NAME,
  dst.COLUMN_NAME,
  dst.DATA_TYPE,
  dst.CHARACTER_MAXIMUM_LENGTH
FROM originalDB.INFORMATION_SCHEMA.COLUMNS src
  INNER JOIN newDB.INFORMATION_SCHEMA.COLUMNS dst
    ON dst.TABLE_NAME COLLATE DATABASE_DEFAULT = src.TABLE_NAME COLLATE DATABASE_DEFAULT
    AND dst.COLUMN_NAME COLLATE DATABASE_DEFAULT = src.COLUMN_NAME COLLATE DATABASE_DEFAULT
WHERE 
  dst.CHARACTER_MAXIMUM_LENGTH &lt; src.CHARACTER_MAXIMUM_LENGTH
  OR 
  dst.DATA_TYPE COLLATE DATABASE_DEFAULT &lt;&gt; src.DATA_TYPE COLLATE DATABASE_DEFAULT;