Contents Index Importing Importing databases

ASA SQL User's Guide
  Importing and Exporting Data
    Importing

Import tools


There are a variety of tools available to help you import your data.

Interactive SQL Import wizard 

You can access the import wizard by choosing Data > Import from the Interactive SQL menu. The wizard provides an interface to allow you to choose a file to import, a file format, and a destination table to place the data in. You can choose to import this data into an existing table, or you can use the wizard to create and configure a completely new table.

Choose the Interactive SQL Import wizard when you prefer using a graphical interface to import data in a format other than text, or when you want to create a table at the same time you import the data.

INPUT statement 

You execute the INPUT statement from the SQL Statements pane of the Interactive SQL window. The INPUT statement allows you to import data in a variety of file formats into one or more tables. You can choose a default input format, or you can specify the file format on each INPUT statement. Interactive SQL can execute a command file containing multiple INPUT statements.

If a data file is in DBASE, DBASEII, DBASEIII, FOXPRO, or LOTUS format and the table does not exist, it will be created. There are performance impacts associated with importing large amounts of data with the INPUT statement, since the INPUT statement writes everything to the Transaction log.

Choose the Interactive SQL INPUT statement when you want to import data into one or more tables, when you want to automate the import process using a command file, or when you want to import data in a format other than text.

For more information, see INPUT statement [Interactive SQL].

LOAD TABLE statement 

The LOAD TABLE statement allows you to import data only, into a table, in an efficient manner in text/ASCII/FIXED formats. The table must exist and have the same number of columns as the input file has fields, defined on compatible data types. The LOAD TABLE statement imports with one row per line, with values separated by a delimiter.

Use the LOAD TABLE statement when you want to import data in text format. If you have a choice between using the INPUT statement or the LOAD TABLE statement, choose the LOAD TABLE statement for better performance.

For more information, see LOAD TABLE statement.

INSERT statement 

Since you include the data you want to place in your table directly in the INSERT statement, it is considered interactive input. File formats are not an issue. You can also use the INSERT statement with remote data access to import data from another database rather than a file.

Choose the INSERT statement when you want to import small amounts of data into a single table.

For more information, see INSERT statement.

Proxy Tables 

You can import data directly from another database. Using the Adaptive Server Anywhere remote data access feature, you can create a proxy table, which represents a table from the remote database, and then use an INSERT statement with a SELECT clause to insert data from the remote database into a permanent table in your database.

For more information about remote data access, see Accessing Remote Data.


Contents Index Importing Importing databases