I have a table with one column with 48251 rows in all with distinct id's so:
gives the reults 48251
I then do:
which returns a result of 0.
This indicates to me that all event numbers in the first table can be found in the second.
I then do:
that gives a reult of 38207 when I was expecting 48251 i.e. all of them are in the second table.
I have also tried:
and this gives the result of 38207.
Can anyone explain this ?
[blue]DBomrrsm[/blue] ![[bandito] [bandito] [bandito]](/data/assets/smilies/bandito.gif)
[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
Code:
select count (distinct event_number)
from ZBI_SIEBEL_CUST_CONTACT_OS_ITEMS
I then do:
Code:
select count (distinct event_number)
from ZBI_SIEBEL_CUST_CONTACT_OS_ITEMS
where event_number not in
(select event_number from zbisiebel_sr_act_ccc)
This indicates to me that all event numbers in the first table can be found in the second.
I then do:
Code:
select count (distinct event_number)
from ZBI_SIEBEL_CUST_CONTACT_OS_ITEMS
where event_number in
(select event_number from zbisiebel_sr_act_ccc)
I have also tried:
Code:
select count (distinct t1.event_number)
from ZBI_SIEBEL_CUST_CONTACT_OS_ITEMS t1
left outer join zbisiebel_sr_act_ccc t2
on t1.event_number = t2.event_number
where t2.event_number is not null
Can anyone explain this ?
![[bandito] [bandito] [bandito]](/data/assets/smilies/bandito.gif)
![[bandito] [bandito] [bandito]](/data/assets/smilies/bandito.gif)
[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]