During a destination-template transfer, the access service inserts the data values it retrieves with the sourceselectstatement from the source database into the destination-template SQL clause.
The transfer statement must be the only statement in a request.
The table into which you want to transfer data (the target) must already exist. The transfer statement does not create new tables in the transfer target.
The structure of the target table must match the structure of the source table.
For any transfer to work, the ConnectionSpec to the secondary connection must be recorded in the sql.ini file for Windows or in the interfaces file for UNIX.
transfer [with report]
{to | from} ‘secondaryname userid password’;
sourceselectstatement;
destinationtemplatestatement
transfer must begin all transfer statements.
with report is an optional phrase specified in the first line of the transfer statement that instructs the access service to return processing information to the client application.
This information is returned as a result set that consists of one VARCHAR column and one row. The row contains the number of rows transferred, rejected, or modified during processing.
All of the elements of the character string must be enclosed in single or double quotes in the sequence.
sourceselectstatement specifies a SQL statement that is executed against the source database to produce the result set that will be used in the transfer. This statement can be of any complexity acceptable to the source database, including stored procedures. SQL transformation is not performed on the sourceselectstatement. The transformation must be in the source database SQL syntax.
destinationtemplatestatement is a SQL statement or any statement that is valid for the target database environment where it executes. SQL transformation is not performed on the destinationtemplatestatement. The transformation must be in the destination database SQL syntax.
This statement can include question marks as placeholders for the data values that will be inserted. It can also include qualifiers to specify datatypes for the question mark placeholders in the destinationtemplatestatement.
To increase processing efficiency, you can batch destination-templates together for processing. Use the TransferBatch configuration property or a set statement to specify the number of templates to batch.