Transfer Tables from a Destination File

Use the transfer table command to load data into SAP ASE from a table contained in an external file.

The table you load does not require a unique primary index, unless you are loading data that has changed from data already in the table (you can load new data without any restrictions). However, loading data becomes an issue when a row duplicates data already in the table, and you do not want the data duplicated. To prevent this, a unique primary index allows SAP ASE to find and remove the old row the new row replaces.

The table you load must have a unique index as its primary key (either a clustered index for allpages-locked tables, or a placement index for data-only-locked tables). A unique index allows transfer to detect attempts to insert a duplicate key, and converts the internal insert command to an update command. Without that index, SAP ASE cannot detect duplicate primary keys. Inserting an updated row causes:
This example transfers the pubs2.titles table from the external titles.tmp file located in /SAP/data into SAP ASE:
transfer table titles from '/SAP/data/titles.tmp' for ase

You cannot use all the parameters for the transfer table...from that you use with transfer table. . .to. Parameters that are inappropriate for loading data from a file produce errors and the transfer command stops. Earlier versions of SAP ASE include parameters for the from parameter that are reserved for future use, but transfer ignores these parameters if you include them with your syntax. The parameters for the from parameter are: