createandloadfromoraquery

Syntax

createandloadfromoraquery [owner_name.]table_name [num_threads] query

Description

Takes a table name, the number of threads for parallel load and an Oracle SELECT statement.

Creates the table in TimesTen if the table does not exist. Then, loads the table with the query result from the Oracle database. If the command creates the table, the table column names and types are derived from the query result.

Notes:

  • The specified TimesTen table cannot be a system table, a synonym, a view, a materialized view or a detail table of a materialized view, a global temporary table or a cache group table.

  • The query cannot have any parameter bindings.

  • Any unsupported column types result in a warning being logged. The output issues a comment for the unsupported column data type.

  • If you do not supply a value for num_threads, defaults to four threads.

  • For details and usage information, see Loading Data from an Oracle Database into a TimesTen Table Without Cache in Oracle TimesTen In-Memory Database Operations Guide.

  • You must rollback or commit after running this operation.

  • Also see the NOTES section in the description of the built-in procedure ttLoadFromOracle.

Required Privileges:

Requires INSERT privilege on the table specified. Also, requires the CREATE TABLE privilege if the table does not exist. The Oracle session user must have all required privileges to run the query on the Oracle database.

Examples

Command> createandloadfromoraquery C1 'select * from PAT.C1';