ASA SQL User's Guide
Importing and Exporting Data
Importing
To import a table (Interactive SQL Data Menu)
Ensure that the table you want to place the data in exists.
From the Interactive SQL window, choose Data
The Open dialog appears.
Locate the file you want to import and click Open.
You can import data in text, DBASEII, Excel 2.1, FOXPRO, and Lotus formats.
The Import wizard appears.
Select the Create A New Table With The Following Name option and enter a name for the new table in the field.
Follow the remaining instructions in the wizard.
If the import is successful, the Messages pane displays the amount of time it to took to import the data. If the import is unsuccessful, a message appears indicating the import was unsuccessful. The Results tab in the Results pane displays what execution plan was used.
To import a table (Interactive SQL)
In the SQL Statements pane of the Interactive SQL window, create the table you want to load data into.
You can use the CREATE TABLE statement to create the table.
Execute a LOAD TABLE statement. For example,
LOAD TABLE department FROM 'dept.txt'
The LOAD TABLE statement appends the contents of the file to the existing rows of the table; it does not replace the existing rows in the table. You can use the TRUNCATE TABLE statement to remove all the rows from a table.
Neither the TRUNCATE TABLE statement nor the LOAD TABLE statement fires triggers, including referential integrity actions such as cascaded deletes.
The LOAD TABLE statement has an optional STRIP clause. The default setting (STRIP ON) strips trailing blanks from values before inserting them. To keep trailing blanks, use the STRIP OFF clause in your LOAD TABLE statement.
For more information about the LOAD TABLE statement syntax, see LOAD TABLE statement.