OSQL IMPORT Command

PURPOSE:  This command imports all rows from an Oracle table to a DB-MACH2 or RMS table.  The column names and data types must be identical in the source and destination table names.  If the DEFINE PM clause is included, then the process module created to execute the command will be saved in the current DBL under the object name specified.

Syntax

OSQL IMPORT FROM source_table_name
      
TO destination_table_name
       [INCLUDE include_list]
       [DEFINE PM process_module_name [ONLY]]

source_table_name

is the name of the Oracle table from which you want to import data.

destination_table_name

is the name of the DB-MACH2 or RMS table in which you wish the imported data to reside.

INCLUDE include_list

includes code from a Code Segment (CS) into a particular section/location within the OSQL generated process module.

DEFINE PM

specifies that the process module containing the code generated to

process_module_name

execute the OSQL command be saved and named as an object in the current DBL.  This process module is made up of ACCENT R SPL statements and is useful for prototyping applications.  Defining the Process Module causes your OSQL command to be compiled for faster execution.

ONLY

specifies that the Process Module will be created without being executed by OSQL.  This clause is used primarily by the OSQL BUILD command but may also be used for on-line prototyping.  If you include the ONLY clause then you must invoke the Process Module interactively.

Example

*OSQL IMPORT FROM STORES_ORA TO NISDATA:STORES_RMS

NOTES:  All rows of the source table will be inserted into the destination table.  All rows in the destination table will be cleared.  The Oracle Server must be declared before this command is issued.

SEE ALSO:  OSQL EXPORT, OSQL CREATE DS

OSQL Help Command    OSQL Insert Command