title: how to solve this issue:Cannot resolve the collation
body: <p>I used this storeproceure.In this procedure am using temp table.Above error came while execution procedure.</p>
  
  <pre><code>ALTER Procedure [dbo].[GetAllBranchName]
  (
      @code nvarchar(4),
      @bankcode varchar(9)
  )
  as
  begin
      if(@code&lt;&gt;'A')
      begin
          create table #tmprecs (branchcode nvarchar(50))
  
          insert #tmprecs
          select distinct BranchCode from PenMaster 
          where SUBSTRING(BranchCode,4,3)=@bankcode and Tocode=@code
  
          select b.RBI_CODE as RBI_Code,b.BR_NAME as BR_Name from #tmprecs a 
          inner join NEWRECSBRANCH b
          on a.branchcode=b.RBI_CODE
          where SUBSTRING(BranchCode,4,3)=@bankcode
  
          drop table #tmprecs
      end
  
      if(@code='A')
      begin
          select RBI_CODE,BR_NAME from NEWRECSBRANCH
          where SUBSTRING(RBI_CODE,4,3)=@bankcode order by BR_NAME
      end
  
  end
  </code></pre>
  
  <p>i got this error:Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AI" in the equal to operation.</p>
  
  <p>i added replication also .so how will cleared this issue</p>