Contents Index Importing data Exporting

ASA SQL User's Guide
  Importing and Exporting Data
    Importing

Importing a table


To import a table (Interactive SQL Data Menu)

  1. Ensure that the table you want to place the data in exists.

  2. From the Interactive SQL window, choose Data > Import.

    The Open dialog appears.

  3. 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.

  4. Select the Create A New Table With The Following Name option and enter a name for the new table in the field.

  5. 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)

  1. 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.

  2. 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.


Contents Index Importing data Exporting