Collation Ploblem

Collation Ploblem

Trying to do a query whith an IN Clause, but having the following error:

Mensagem 468, Nível 16, Estado 9, Linha 7 Não foi possível resolver o conflito de agrupamento entre “SQL_Latin1_General_CP1_CI_AS” e “SQL_Latin1_General_CP850_CI_AS” na operação equal to.

My Translation: Not possible to solve the collation conflict….

Both Databases Have Same Collation and are in the same sql server

Properties of database SBOMarmovidro

Properties of database MarmovidroAUX

following, the query:

declare
@inventario int

set
@inventario='3'
    
    insert into [MarmovidroAUX].[dbo].[Snap_Banco_Chapa]
select 
@inventario,
a.ItemCode as CodItem,
a.SysNumber as SYSNR_Lote,
a.DistNumber as CodLote,
a.Status,
a.AbsEntry as ABS_Lote,
b.ItemName as NomeItem,
a.U_Comp_A as Comprimento,
a.U_Larg_A as Largura,
a.U_Comp_B as Comprimento_B,
a.U_Larg_B as Largura_B,
a.U_Num_Bloco as Codigo_Bloco_Fabricante,
d.Name as Nome_Bloco_Fabricante,
a.U_Tipo_Mapa_Chapas as Tipo_de_Mapa,
a.U_Tipo_Chapa_Mapa as Posição_Chapa_no_Mapa,
a.U_Num_Chapa_Bloco as ID_Chapa_Bloco_Fabricante,
a.U_Lote_Pai as Lote_Pai,
a.U_Local_Chapa,
a.U_Chapa_L as Chapa_L,
c.WhsCode as Cod_Deposito,
e.AbsEntry as ABS_Posição,
e.BinCode as Cod_posição_deposito,
c.OnHandQty as Qtd_na_Posição

from

SBOMarmovidro.dbo.OBTN a 
left join SBOMarmovidro.dbo.OITM b on a.ItemCode=b.ItemCode
left join SBOMarmovidro.dbo.OBBQ c on a.AbsEntry=c.SnBMDAbs
left join SBOMarmovidro.[dbo].[@TAB_BLOCOS_CHAPAS] d on a.U_Num_Bloco=d.Code
left join SBOMarmovidro.dbo.OBIN e on c.BinAbs=e.AbsEntry

where

b.QryGroup1='Y' 
and b.frozenFor='N' 
--and c.WhsCode=06
and a.ItemCode in (select f.ItemCode from Tab_Filtros_Inventarios f where f.Inventario=@inventario)

Could you help me how to solve it?

Back To Top