| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Queries give impossible results
>
> The wrong result might be related to a bug in "bitmap conversion". Can
> you check what the execution plan is for the last query? You could
> also try something like
>
> SELECT /*+ RULE */ count(*)
> FROM ci_customer
> WHERE customer_state = 'ACTIVE'
> AND customer_type <> 'PERSON';
>
> Regards,
> Mike
Hmm. This should be a correct result.
SQL> SELECT /*+ RULE */ count(*)
FROM ci_customer
WHERE customer_state = 'ACTIVE'
AND customer_type <> 'PERSON';
COUNT(*)
135321
We also found out that:
SQL> SELECT count(*) FROM ci_customer WHERE UPPER(customer_type) != 'PERSON'; COUNT(*)
138292
Could this be related with character sets somehow? If you see the first example I posted, this doesn't completely make sense because:
SQL> select distinct customer_type from ci_customer;
CUSTOMER_TYPE
![]() |
![]() |