My native C++ client application creates the following SQL and then uses a Command object to execute it against a SQL Server 2008 database target. I am finding that the same SQL works fine on Win7 with SP1 or WinServer 2008R2 with SP1 but fails
on earlier platforms with Recordset error 80040e14, IDispatch error #3092, description="Incorrect syntax near the keyword 'MERGE'".
I'm aware of the issues caused by compiling under Win7 SP1 and have reverted to a version of my app which was compiled before SP1 and get the same error. I'm wondering whether ADO pre-SP1 'understands' the MERGE syntax, or would welcome some advice
on what the problem is. I think my workaround is going to be something like creating a stored procedure and then executing it but the existing way is my preferred one. Anyway, the SQL is:
MERGE pdata_7_PCYT AS target USING
qry.[BaseQty], qry.[PromoQty], qry.[PromFlag], qry.[Qty], qry.[GSV], qry.[OffInPCGBP], qry.[OffInvPctGBP], qry.[TtOffInv], qry.[InvValue], qry.[RetrPPCGBP], qry.[RetroPctGBP], qry.[TotRetro], qry.[CSV], qry.[TrmDPPCGBP], qry.[TermsPctGBP],
qry.[TermsTot], qry.[NSV], qry.[
View Complete Post