Adds new rows to a table or view.
insert [into] [database.[owner.]]{table_name|view_name} [(column_list)] {values (expression [, expression]...) |select_statement }
Usage
Component Integration Services processes the insert command when the table on which it operates has been created as a proxy table. Component Integration Services forwards the entire request (or part of it) to the server that owns the actual object.
When Component Integration Services forwards the insert command to a remote server, the table name used is the remote table name, and the column names used are the remote column names. These names may not be the same as the local proxy table names.
insert commands using the values keyword are fully supported.
insert commands using a select command are supported for all datatypes except text and image. text and image columns are only supported when they contain null values.
If all insert and select tables reside on the same remote server, the entire statement is forwarded to the remote server for execution. This is referred to as quickpass mode. Quickpass mode is not used if the select statement does not conform to all the quickpass rules for a select command (see “select”).
If the select tables reside on one remote server, and the insert table resides on a different server, Component Integration Services selects each row from the source tables, and inserts the row into the target table.
Handling of the insert statement is the same as for ASEnterprise.
Handling of the insert statement is the same as for ASEnterprise.
Handling of the insert statement is the same as for ASEnterprise.
insert commands using the values keyword are fully supported.
insert commands using a select command are fully supported, but the table must have a unique index if the table has text or image columns. When using insert with a select command, the entire command is sent to the remote server if:
All tables referenced in the command reside on the remote server
The capabilities response from the DirectConnect indicates that insert-select commands are supported
If both conditions are not met, Component Integration Services selects each row from the source tables, and inserts the row into the target table.
Component Integration Services passes data values as parameters to either a cursor or a dynamic SQL statement. Language statements can also be used if the DirectConnect supports it. The parameters are in the datatype native to Adaptive Server and must be converted by the DirectConnect into formats appropriate for the target DBMS.
insert commands using the values keyword are fully supported for all valid DB2 datatypes.
insert commands using a select command are fully supported for all valid DB2 datatypes.
When using insert with a select command, the entire statement is sent to the remote server if:
All tables referenced in the statement reside on the remote server
Trace flag 11215 is enabled
If both conditions are not met, Component Integration Services selects each row from the source tables, and inserts the rows into the target table.
See Also
insert in the Adaptive Server Reference Manual.