Skip to main content

SLAM_table_template

Creates a SQL table with appropriate data types for the provided Salesforce object and operation type.

Parameters:

NameTypeDefaultDescription
@sObjectNVARCHARRequiredSalesforce object name to create template for
@operationNVARCHARRequiredOperation type ('insert', 'update', 'upsert', 'delete', 'hardDelete', 'undelete')
@tableNVARCHARRequiredTarget SQL table name to create
@exists_actionVARCHAR(20)NULLAction to take if the target object name specified by @table is already taken. If NULL, uses the value from SLAM_Settings.default_exists_action (defaulted to 'drop' during initial setup).

Valid options:
  • 'drop'
  • 'rename'
  • 'fail'

Usage Examples:

Create template for inserting new Account records:

EXEC dbo.SLAM_table_template
@sObject = 'Account',
@operation = 'insert',
@table = 'Account_insert_template'

Create template for updating existing Contact records:

EXEC dbo.SLAM_table_template
@sObject = 'Contact',
@operation = 'update',
@table = 'Contact_update_template'

Create template for upserting Opportunity records:

EXEC dbo.SLAM_table_template
@sObject = 'Opportunity',
@operation = 'upsert',
@table = 'Opportunity_upsert_template'