select source_type, data_load_type from wc_table_inf
where not (source_type IN ('EHUB','FOCUS','SAPReport')
and data_load_type in ('FULL','INCR'));
这是一个EDW查询。我需要在hive中使用等效查询。我怎么能解决这个问题?
答案 0 :(得分:0)
试试这个。
select source_type, data_load_type from wc_table_inf where source_type not in ('EHUB','FOCUS','SAPReport') and data_load_type not in ('FULL','INCR');
答案 1 :(得分:0)
您必须展开布尔逻辑NOT (A and B) = NOT A OR NOT B
SELECT source_type
,data_load_type
FROM wc_table_inf
WHERE source_type NOT IN (
'EHUB'
,'FOCUS'
,'SAPReport'
)
OR data_load_type IN (
'FULL'
,'INCR'
);