Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: MERGE - INSERT/UPDATE

Re: MERGE - INSERT/UPDATE

From: poratips shah via DBMonster.com <forum_at_DBMonster.com>
Date: Wed, 04 May 2005 22:28:50 GMT
Message-ID: <b22fe0e537b24808878ed4882df298f0@DBMonster.com>


Thanks lot.
You know I was checking same thing and I got confused. I have checked following...
1) select count(*) from SKU -- 26682 Records -- This is the parent table for sku_attr table
2) select count(*) from SKU_ATTR -- 8494 Records - 3)select count(sku_id) from SKU_ATTR where sku_id in (select sku_id from sku) -- 8494 Records--
4) select count(sku_id) from SKU where sku_id in (select sku_id from sku_attr) -- 3259 Records --
5) select count(distinct(sku_id)) from sku -- 26682 Records-- 6) select count(sku_id) from SKU where sku_id not in (select sku_id from sku_attr) 23423 Records--
7)select count(sku_id) from SKU_ATTR where sku_id not in (select sku_id from sku) -- 0-- which one need to consider for error? 10)select count(sku_id) from SKU_ATTR where sku_id not in (select sku_id from sku_ext) -- 179-- which one need to consider for error? 8)select count(*) from sku_ext -- 25509 -- this is the external table from which i am loading data into sku table
9)select count(*) from sku_ATTR_ext -- 25877 --this is the external table from which i am loading data into sku_attr table 10)select count(sku_id) from SKU_ATTR where sku_id not in (select sku_id from sku_ext) -- 179--
11)select count(*) from sku_ATTR_ext where sku_id not in (select sku_id from sku_ext) -- 368 Records
12)select count(*) from sku_ext where sku_id not in (select sku_id from sku_attr_ext)-- 0 Records --
Now my question is which one I need to consider? Which one I need to consider for parent key not found error?
-- 11 or 12 ??

thanks,
Prashant Shah

--

Message posted via http://www.dbmonster.com Received on Wed May 04 2005 - 17:28:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US