TMACUL

Loading differences between ca_contact and usp_contact

Blog Post created by TMACUL Champion on Dec 23, 2015

A.

select contact_uuid

from mdb..ca_contact as cnt

where not exists (

                                select 0

                                from mdb..usp_contact as usp

                                where cnt.contact_uuid = usp.contact_uuid

                          )

How to know if i do the right thing?

 

Just counting the differences

 

B.

select count(0) from  mdb..ca_contact

 

 

C.

select count(0) from mdb..usp_contact

 

 

Comparing the quantity of register on Query A need to be B-C  or ....

 

 

select count(0) -(select count(0) from mdb..usp_contact )

from  mdb..ca_contact

 

 

 

 

 

Subconsultas com NOT EXISTS

Outcomes