Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Importing and Exporting Data » Importing data » Import tools

Import tools Next Page

Using the Interactive SQL Import wizard

The Interactive SQL Import wizard lets you choose a source and format, and a destination table for the data. You can import data in text, DBASEII, DBASEIII, Excel 2.1, FOXPRO, and Lotus formats. 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.

Use the Interactive SQL Import wizard when you:


This example shows you how to import data using the Interactive SQL Data menu.

To import data (Interactive SQL Data menu)
  1. From the Data menu, choose Import.

    The Open dialog appears.

  2. Locate the file you want to import, and then click Open.

    The Import wizard appears.

  3. Specify how the database values are stored in the file that 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 also click Browse and locate the table you want to import the data into.

  5. For ASCII files, you can specify the following:

    The encoding option allows you to specify the code page that is used to read the file to ensure that characters are treated correctly. If you select (Default), the default encoding for the system that Interactive SQL is running on is used.

    For more information, see Recommended character sets and collations.

  6. Follow the remaining instructions in the wizard.

    Importing adds the new data to the existing table. If the import is successful, the Messages tab displays the amount of time it to took to import the data. If the import is unsuccessful, a message appears indicating that the import was unsuccessful.

The following example shows you how to add data to the Employees table of the SQL Anywhere sample database. This example adds information about an employee named Julia Chan.

To import data into the SQL Anywhere sample database
  1. Create and save a text file named import.txt with the following values (on a single line):

    100,500,'Chan','Julia',100,'300 Royal Drive',
  2. In Interactive SQL, choose Import from the Data menu.

  3. Locate the import.txt file and then click Open.

    The Import wizard appears.

  4. Select the Separated by commas or some other delimited option.

  5. Select the Use An Existing Table option and then enter Employees as the name of the destination table. Click Next.

  6. Follow the remaining steps, accepting the defaults, in the Import wizard.