|
-
SQL to find difference in 2 instances
Hi..
I am running a simple SQL statement..
select count(*) from customer_dedup --9041 rows (a)
select count(*) from [email protected]d --9258 rows (b)
SQL> desc customer_dedup
Name Null? Type
----------------------------------------- -------- -------------
CUSTOMER_NUMBER NOT NULL VARCHAR2(18)
REF_CUSTOMER_NUMBER VARCHAR2(18)
MASTER_CUSTOMER_NUMBER VARCHAR2(18)
UPD_FLAG CHAR(1)
SQL> -- Customer_number is PK
I want to see the 217 rows that are in b and not in a
select customer_number from customer_dedup
where CUSTOMER_NUMBER not in (select customer_number from [email protected]d )
Coming out with errors.. What am I missing ?
Thanks, ST2000
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|