CHAPTER 5 Moving Data In and Out of Databases
193
•
Tables in either the IQ Store or the Catalog Store of the database you are
currently connected to.
•
Tables in an Adaptive Server Enterprise database.
•
A proxy table in your current database, that corresponds to a table in a
database on a remote server. Adaptive Server IQ's remote data access
capabilities are currently supported on Windows NT only. For details, see
the Adaptive Server IQ Installation and Configuration Guide for Windows
NT.
Inserting directly from
an Adaptive Server
Enterprise database
You can insert data easily from an Adaptive Server Enterprise or SQL Server
database, using the
LOCATION
syntax of the
INSERT
statement. You can also
use this method to move selected columns from a pre-Version 12 Adaptive
Server IQ database into a Version 12 database.
In order to use this capability, all of the following must be true:
•
The Sybase connectivity libraries must be installed on your system, and
the load library path environment variable for your platform must point to
them.
•
The Adaptive Server Enterprise server to which you are connecting must
exist in the interfaces file on the local machine.
•
You must have read permission on the source ASE or pre-Version 12 IQ
database, and INSERT permission on the target IQ 12 database
❖
To insert data directly from Adaptive Server Enterprise
1
Connect to both the Adaptive Server Enterprise and the Adaptive Server
IQ 12 database using the same user ID and password.
2
On the Adaptive Server IQ 12 database, issue a statement using this
syntax:
INSERT INTO
asiq_table
LOCATION ’
ase_servername.ase_dbname’
{ SELECT
col1, col2, col3,...
FROM
owner.ase_table }
3
Issue a
COMMIT
to commit the insert.
Example
The following command inserts data from the
l_shipdate
and
l_orderkey
columns of the
lineitem
table from the Adaptive Server IQ 11.5 database
asiq11db.dba
on the server
detroit
, into the corresponding columns of the
lineitem
table in the current database.
INSERT INTO lineitem
(l_shipdate, l_orderkey)
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...