title: Cannot resolve the collation conflict in my query
body: <p>I'm trying to select a view &amp; inner join it with another table in SQL Server 2012 but it is showing this error</p>
  
  <blockquote>
    <p>Msg 468, Level 16, State 9, Line 18<br>
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AI" in the equal to operation.</p>
  </blockquote>
  
  <p>This is my query:</p>
  
  <pre><code>SELECT 
      vpr.PARTNUMBER, vpr.DESCRIPTION, 
      vpr.BUYER, vpr.[GL CLASS], vpr.[ABC CODE], 
      vpr.TODAY, vpr.DAY1, vpr.DAY2, vpr.DAY3, vpr.DAY4, vpr.DAY5, 
      vpr.[COO QTY], 
      ROUND(vpr.[QOH-MSTORE], 0) AS [QOH-MSTORE], 
      vpr.[QOH-COO], vpr.[QOH-SDV], 
      ABS(ROUND(vpr.TOPUPQTY, 0)) AS [TOPUPQTY],
      (CASE 
          WHEN ABS(ROUND(vpr.TOPUPQTY, 0)) &lt; vpr.[QOH-SDV] THEN ABS(ROUND(vpr.TOPUPQTY, 0))
          WHEN ABS(ROUND(vpr.TOPUPQTY, 0)) &gt;= vpr.[QOH-SDV] THEN vpr.[QOH-SDV]
       END) AS [SDV TO PICK]
  FROM 
      vw_PartsReport vpr
  LEFT JOIN
      (SELECT twudc.Description1 
       FROM tbl_WH_UserDefineCodes twudc
       WHERE twudc.UserDefineCodes = 'SO'
       GROUP BY twudc.Description1) AS [SOI] ON vpr.PARTNUMBER = Description1
  WHERE 
      vpr.TOPUPQTY &lt;= 0
  </code></pre>
  
  <p>Can someone please advise me what's the problem with my query? Thanks</p>