Sybase IQ从远程数据库插入到本地数据库
Sybase IQ Insert location使用
1 命令介绍
INSERT [INTO] [owner.]table-name[ (column-name [, ... ] ) ]
... insert-load-options
[ LOCATION 'servername.dbname'
[ location-options ] ]
... { select-statement }
【参数说明】
insert-load-options
[ LIMIT number-of-rows ]:The LIMIT option specifies the maximum number of rows to insert into the table from a query. The default is 0 for no limit. The maximum is 2GB -1.指定插入的最大的行数。 www.zzzyk.com
[ NOTIFY number-of-rows ]:The NOTIFY option specifies that you be notified with a message each time the number of rows are successfully inserted into the table. The default is every 100,000 rows. 每次插入时都有消息提示,默认是100,000行提示一次。
[ SKIP number-of-rows ]:The SKIP option lets you define a number of rows to skip at the beginning of the input tables for this insert. The default is 0.忽略几行开始插入
[ START ROW ID number ]:The START ROW ID option specifies the record identification number of a row in the IQ table where it should start inserting. This option is used for partialwidth inserts, which are inserts into a subset of the columns in the table. By default, new rows are inserted wherever there is space in the table, and each insert starts a new row。
location-options
[ ENCRYPTED PASSWORD ]:
[ PACKETSIZE packet-size ]:The PACKETSIZE parameter specifies the TDS packet size in bytes. The default TDS packet size on most platforms is 512 bytes. If your application is receiving large amounts of text or bulk data across a network, then a larger packet size might significantly improve performance.
[ QUOTED_IDENTIFIER { ON | OFF } ]
【例子】
INSERT INTO lineitem
(shipdate, orderkey)
LOCATION 'detroit.asiqdb'
PACKETSIZE 512 www.zzzyk.com
' SELECT shipdate, orderkey
FROM lineitem '
【说明】:Inserts data from the shipdate and orderkey columns of the lineitem
table from the Sybase IQ 11.5 database asiq11db.dba on the server detroit,
into the corresponding columns of the lineitem table in the current
database。把远端数据库的表插入到本地
【注意问题】
Enter the remote server database name in the directory services (inte易做图ces) file—inte易做图ces文件中必须加上server的名字
建立server是必须有DBA的权限
You can insert a maximum of 2147483647 rows.
You cannot use unsigned integer data.
作者 housheng33