sql - Syntax errors when migrating a .bak created in SQLServer 2000 to SQLServer 2008 then to SQLServer 2012 -
sqlserver 2012 sends me syntax error while executing stored procedure:
doc.id_doc = @pi_id_doc , doc.id_doc = det.id_doc , det.recibo_concep = rec.recibo_concep , doc.cuenta = cto.cuenta , doc.cta_consec = cto.cta_consec , cta.cuenta = cto.cuenta , doc.cuenta *= lec.cuenta , doc.cta_consec *= lec.cta_consec , doc.bimestre *= lec.bimestre
especially while using expresion "*=".
i executed same stored procedure no changes in sqlserver 2008 no problems.
does '*=' have meaning different '='?
there changes in syntax between sql server 2008 , sql server 2012?
*=
(and =*
) outer join using old-style syntax (syntax popular still in oracle, has been deprecated since sql server 2008 , officially discontinued in sql server 2012). syntax no longer supported , has many problems. info here:
bad habits kick : using old-style joins
you need re-write these queries modern left / right join
versions in order make them compatible sql server 2012. should make new versions of queries , keep old versions, on 2008 instance, can validate re-writes return correct results.
erland sommarskog has guide might help:
Comments
Post a Comment