title: Implicit conversion of varchar value to varchar - collation conflict
body: <p>I'm getting the following error whilst running this script. I've tried using the following:
  COLLATE Latin1_General_CI_AS. Please can it be sorted? Thanks</p>
  
  <blockquote>
    <p>Msg 457, Level 16, State 1, Line 8<br>
    Implicit conversion of varchar value to varchar cannot be performed because the collation of the value is unresolved due to a collation conflict</p>
  </blockquote>
  
  <pre><code>DECLARE @AccountID INT 
  SET @AccountID = 12
  
  SELECT TOP 1    ac.AccountID,
              co.Email,
              ao.AccountOptionID
  FROM CRM.acc.Account ac
  INNER JOIN CRM.[profile].[Profile] pr
      ON pr.ProfileID = ac.ProfileFK
  INNER JOIN CRM.[profile].Contact co
      ON pr.ProfileID = co.ProfileFK
  LEFT JOIN CRM.acc.[AccountOption] ao
      ON ao.AccountFK = ac.AccountID
  LEFT JOIN (
              SELECT OptionID
              FROM CRM.acc.[Option]
              WHERE [Name] = 'SMS messages') op
      ON op.OptionID = ao.OptionFK
  WHERE ac.AccountID = @AccountID
  
  UNION ALL
  
  SELECT      u.UnsubscribeID,
          u.EmailAddress,
          u.SentEmailFK
  FROM  Email.dbo.Unsubscribe u
    INNER JOIN  (
                      SELECT      CASE
                                        WHEN AccountTypeFK = 2 THEN OnlineBillingEmail
                                        ELSE EmailBillingEmail
                                  END [EmailAddress]
                      FROM  CRM.acc.Account
                      WHERE AccountID = @AccountID                    
                      ) ace
          ON ace.EmailAddress COLLATE DATABASE_DEFAULT  = u.EmailAddress COLLATE DATABASE_DEFAULT
  WHERE ISNULL(ace.EmailAddress, '') != ''
  </code></pre>