ODBC guide

Bulk upsert accounts using SQL Server data


Upserts multiple Account records in bulk using data from a SQL Server database. This example demonstrates using the SOURCE clause with UPSERT INTO to synchronize data from an external source to Zoho CRM.

UPSERT INTO Accounts
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,'select ''Test Account-A'' as Account_Name,''111-111-1111'' as Phone
    UNION
    select ''Test Account-B'' as Account_Name,''222-222-2222'' as Phone
   '
)