2017-11-06 7 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)"