Chapter 32. Importing and exporting data

Table of Contents

Importing and exporting between GDBase databases
Importing from a local GDBase database
Importing from a remote GDBase database
Exporting to the local GDBase database
Exporting to a remote GDBase database
Importing and exporting using ODBC drivers
IMPORT ... USING ODBC
EXPORT ... USING ODBC
Data types in imported tables

GDBase supports importing and exporting of data tables between different GDBase databases. Exporting and importing of tables using ODBC drivers is also supported.

The IMPORT and EXPORT commands can be issued by any user.

Importing and exporting between GDBase databases

The following commands can be used to import and export data between different GDBase databases:

Importing from a local GDBase database

Syntax: 

IMPORT TABLE table-name [[AS] destination-table-name ]
FROM LOCAL GDBASE (path-to-table) [AS user-name IDENTIFIED BY [CODED] password ]
	

This command imports a table from the local database. If the AS ... IDENTIFIED BY part with user credentials is omitted, the default user is used.

Importing from a remote GDBase database

Syntax: 

IMPORT TABLE table-name [[AS] destination-table-name ]
FROM REMOTE GDBASE(hostname, port) [ AS user-name IDENTIFIED BY [CODED] password ]                
    

This command imports a table from a remote GDBasa database. If the AS ... IDENTIFIED BY part with user credentials is omitted, the default user is used.

Exporting to the local GDBase database

Syntax: 

EXPORT TABLE table-name [[AS] destination-table-name ]
INTO LOCAL GDBASE(path-to-table) [AS user-name IDENTIFIED BY [CODED] password ]
    

This command exports a table to the local database. If the AS ... IDENTIFIED BY part with user credentials is omitted, the default user is used.

Exporting to a remote GDBase database

Syntax: 

EXPORT TABLE table-name [[AS] destination-table-name ]
INTO REMOTE GDBASE(hostname, port) [ AS user-name IDENTIFIED BY [CODED] password ]                
    

This command exports a table to a remote GDBasa database. If the AS ... IDENTIFIED BY part with user credentials is omitted, the default user is used.

To provide a coded version of the password use the IDENTIFIED BY CODED clause. An encoded version of the password can be obtained using the password_coder script, which can be found in the /AdvancedMiner/Server folder.