Contents Index Importing databases Importing a table

ASA SQL User's Guide
  Importing and Exporting Data
    Importing

Importing data


To import data (Interactive SQL Data Menu)

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

    The Open dialog appears.

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

  3. Specify how the database values are stored in the file you are importing.

  4. Select the Use An Existing Table option and then enter the name and location of the existing table. Click Next.

    You can click the Browse button and locate the table you want to import the data into.

  5. Follow the remaining instructions in the wizard.

    In this case, importing appends the new data to the existing table. 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 data (INSERT statement)

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

  2. Execute an INSERT statement. For example,

    INSERT INTO t1
    VALUES ( ... )

    Inserting values appends the new data to the existing table.

To import data (Interactive SQL INPUT statement)

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

  2. Enter an INPUT statement in the SQL Statements pane of the Interactive SQL window. For example,

    INPUT INTO t1
    FROM file1
    FORMAT ASCII;

    Where t1 is the name of the table you want to place the data in, and file1 is the name of the file that holds the data you want to import.

  3. Execute the statement.

    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.

For more information about using the INPUT statement to import data, see INPUT statement [Interactive SQL].


Contents Index Importing databases Importing a table