Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why Target records are extra

3899199Mar 13 2019 — edited Mar 14 2019

There are 2 extracts one is SRC and other TGT

when I load both these extracts through Sql loader into Oracle Db 12c, we have some x records for SRC while y records for TGT

But in actuals, my y>x in the counts . SRC represents SAP source extract while TGT is a SalesForce Extract.

Now in order to find the extra records in my TGT both being loaded in same schema for Oracle, I used below query

select * from

(select * from TGT_Table a, SRC_Table b

where a.customer=b.kndnr and a.order_id=b.kaufn)

where not exists

(select * from TGT_Table a, SRC_Table b

where a.customer=b.kndnr and a.order_id=b.kaufn));

and getting zero records but there are more than 1 million records in the difference between TGT and SRC

1.Is my query right in order to get the extra ones in TGT and

2.How can i find the extra records assuming loader has no bad or discard recordset. Pointers will help here.

Comments
Post Details
Added on Mar 13 2019
3 comments
278 views