0

我有两张桌子

  1. xx_new.xx_online_registrations@appsread.prd.com oreg
  2. m_warranty_sku MSK

在 oreg 表中,我有一些字段 ora_warranty_id 的空值,但在 MSK 表中我没有空值,所以当我加入这两个表时,oreg 的空值列被过滤,有没有办法我也可以捕获该数据. 我正在做下面的 qry 但不确定这是否正确。

select *
from
    (
    select 
   oreg.ora_warranty_id,
   mdh.warranty_sku_num
    from
     mdhdba.m_warranty_sku mdh
         , xx_new.xx_online_registrations@appsread.prd.com oreg
    where
   mdh.warranty_sku_num= oreg.ora_warranty_id(+) -----ora_warranty_id from  xx_new.xx_online_registration table
   )
where ora_warranty_id is  null -- oreg.ora_warranty_id
4

1 回答 1

0

希望这可以帮助,

    select *
from
    (
    select 
   oreg.ora_warranty_id,
   mdh.warranty_sku_num
    from
     mdhdba.m_warranty_sku mdh
         , xx_new.xx_online_registrations@appsread.prd.com oreg
    where
   oreg.ora_warranty_id = mdh.warranty_sku_num(+) -----ora_warranty_id from  xx_new.xx_online_registration table
   )
where ora_warranty_id is  null -- oreg.ora_warranty_id
于 2012-12-19T14:28:17.800 回答