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

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Remote data and bulk operations » Data import and export » Data import


Merge different table structures

Use a variation of the INSERT statement and a global temporary table to rearrange the import data to fit the table.


DBA authority.

Context and remarks


 Load data with a different structure using a global temporary table
  1. In the SQL Statements pane, create a global temporary table with a structure matching that of the input file.

    You can use the CREATE TABLE statement to create the global temporary table.

  2. Use the LOAD TABLE statement to load your data into the global temporary table.

    When you close the database connection, the data in the global temporary table disappears. However, the table definition remains. You can use it the next time you connect to the database.

  3. Use the INSERT statement with a SELECT clause to extract and summarize data from the temporary table and copy the data into one or more permanent database tables.


The data is loaded into a permanent database table.



 See also