ODBC guide

Bulk update customers using SQL Server data


Bulk updates customers by reading data from an external SQL Server database. The source query must return the Id of the customer to update along with the fields to change (e.g. Email, Note).

UPDATE Customers
SOURCE('MSSQL'
 ,'Data Source=localhost;Initial Catalog=tempdb;Integrated Security=true'
 ,'select 111 as Id, ''a@a.com''Email , ''SOLD'' as Note,0 as [$$ContineOn404Error]
  UNION
  select 222 as Id, ''b@b.com''Email , ''SOLD'' as Note,0 as [$$ContineOn404Error]
  '
)