2017-11-06 3 views
0

where節の以下のサブクエリを使用して、netezzaのデータを移行する必要があります。nz_migrateでのサブクエリ

サンプル: -

が私に教えてください可能性があり-sourcewhereclause "(xyz..table2からIDを選択)でidはどこabc..table1 SELECT * FROM"。あなたが句のサブクエリのフィルタは、しかし、あなたはあなたのクエリの場合にのみ一部を提供する必要があるソースを指定することができますnz_migarteヘルプに記載したよう

答えて

1

-SourceWhereClause

# Normally, nz_migrate is used to migrate over the entire contents of a 
# table -- all visible rows. This option allows "you" to tack on a WHERE 
# clause to the data that gets selected ... allowing "you" to migrate a 
# subset of the table. All the power (and responsibility) is put into your 
# hands. Do wrap the clause in double quotes so it will be passed into the 
# script correctly. Examples: 
# 
# -SourceWhereClause "customer_key = 2" 
# -SourceWhereClause "customer_key in (1,3,5)" 
# -SourceWhereClause "region_name = 'AMERICA' or region_key = 0" 
# -SourceWhereClause "order_date between '1998-01-01' and '1998-12-31'" 
# -SourceWhereClause "customer_num in (select cust_id from sales..delinquent_accounts)" 

サンプル: -

-sourcewhereclause "id in (select id from xyz..table2)"