The syntax for a destination-template transfer statement is as follows:
transfer [with report]
{to | from} ‘secondaryname userid password’;
sourceselectstatement;
destinationtemplatestatement
where:
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.
{to | from} indicates the direction of the transfer:
to specifies that the data is transferred from the primary database to the secondary database.
from specifies that the data is transferred from the secondary database to the primary database.
‘secondaryname userid password’ is a character string that provides the information needed to connect to the secondary database:
secondaryname is the name used to identify the secondary database.
userid and password must be valid on the secondary database. You can substitute an asterisk for password, if a password is not specified.
All of the elements of the character string must be enclosed in single or double quotes in the order shown.
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 how many templates to batch.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |