Use the transfer table command to load data into Adaptive Server from a table contained in an external file. See the Reference Manual: Commands.
Adaptive Server version 15.5 must use its internal format to import tables.
The table you are loading 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 Adaptive Server to find and remove the old row the new row replaces.
The table you are loading 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, Adaptive Server cannot detect duplicate primary keys. Inserting an updated row causes:
Some or all of the transfer operation to fail if the table has any other unique index and the row being inserted duplicates a key within that index
The insert to succeed, but the table erroneously contains two or more rows with this primary key
This example transfers the pubs2.titles table from the external titles.tmp file located in /sybase/data into Adaptive Server:
transfer table titles from '/sybase/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. Adaptive Server version 15.5 includes 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:
column_order=option (does not apply to a load using for ase; reserved for future use)
column_separator=string (does not apply to a load using for ase; reserved for future use)
encryption={true | false} (does not apply to a load using for ase; reserved for future use)
progress=nnn
row_separator=string (does not apply to a load using for ase; reserved for future use)