Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Queries give impossible results

Re: Queries give impossible results

From: Jake S <nospam_at_nospam.net>
Date: Fri, 15 Nov 2002 05:57:24 GMT
Message-ID: <810B9.19$Ph.634@read2.inet.fi>


>
> 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




COMPANY
PERSON Received on Thu Nov 14 2002 - 23:57:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US