Using the TableName parameter with the Salesforce driver
The value required in the TableName parameter varies, depending on the bulk operation specified in the SetBulkOperation function. The following paragraphs describe the TableName value based on whether the Bulk Operation type is set to INSERT, DELETE, or UPSERT.
BULK_OPERATION_INSERT
table_name [(column_list)]
where:
column_list
is (columnSpec[, columnSpec]…)
columnSpec
can be columnName or foreignKeyColumnName EXT_ID externalIdColumnName
The column names define the mapping between columns in the table and columns in the bulk data file. The column names can also indicate which columns are External ID columns. Refer to "SQL statements and extensions for the Salesforce driver" in the Progress DataDirect for ODBC for Salesforce User's Guide for more information.
The SQL equivalent of this function is:
INSERT INTO table_name [( column_list )] VALUES (? … ?)
BULK_OPERATION_DELETE
table_name (column_list)
where:
column_list
is the ID column, which identifies the row to delete.
For DELETE, the ID column is the only valid column in the column list.
The SQL equivalent of this function is:
DELETE FROM table_name WHERE <column> = ? AND <column> = ? …
BULK_OPERATION_UPDATE
table_name (column_list)
where:
column_list
is ID_column, <update column>[,<update column>]…
ID_column
must be one of the columns in the column list. The ID column identifies which row to update; the other columns are the list of columns to be updated.
The SQL equivalent of this function is:
UPDATE table_name SET <update column> = ? … WHERE <ID column> = ? …
BULK_OPERATION_UPSERT
table_name (column_list)
where:
column_list
is the same as for INSERT except that at least one of the columns must be identified as an external ID.
For UPSERT, column_list can be (columnSpec[, columnSpec]…)
columnSpec
can be one of the following:
columnName
foreignKeyColumnName EXT_ID externalIdColumnName
extIdColumnEXT_ID
where extIdColumn is the column that is checked to determine whether the row already exists in the database.
The SQL equivalent of this function is one of the following:
If no row matching the table’s key columns is found:
INSERT INTO table_name [(column_list)] VALUES (? … ?)
If a row matching the table’s key columns is found:
UPDATE table_name SET <table column> = ? … WHERE <key column> = ? …
Refer to "Specifying an external ID column" in the Progress DataDirect for ODBC for Salesforce User's Guide for more information.