Search code examples
sqlsql-server-2008database-migrationsql-server-migration-assi

SQL Server 2008 Migration to 2019


I am trying to migrate my 2008 DB to 2019 using Data Migration Assistant. Unfortunately Ii have an Unqualified Join (Behavior Changes) in a Procedure and I can't figure out how to fix it.

Here is the code:

FROM Codebar
INNER JOIN Codebar_IdentPag ON Codebar_IdentPag.Tipo = Codebar.Tipo,  
Account
INNER JOIN AccountName ON AccountId = Account.Id 
LEFT JOIN AccountType2 ON AccountType2.Codigo = AccountType2Cod  
LEFT JOIN AccountType ON AccountType.Codigo = AccountTypeCod  
LEFT JOIN AccountPlan ON AccountPlan .Codigo = AccountPlanCod 
LEFT JOIN Currency ON Currency.Codigo = CurrencyCod
LEFT JOIN Country Country1 ON Country1 .Codigo = CountryCod
WHERE Account.Id = @numAccount  
AND Codebar.Id = @idCodebar  

I think the problem occurs at the first INNER JOIN

What might be the cause of my problem?


Solution

  • Your JOIN syntax bit vogue, just fix it :

    FROM Codebar cb INNER JOIN
         Codebar_IdentPagon IP 
         ON IP.Tipo = Tipo INNER JOIN
         Account A
         ON < whatever mapping you have > INNER JOIN
         AccountName AN
         ON AN.AccountId = A.ID