Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Queries give impossible results
I'm having strange problems with Oracle (8.1.7). Queries give results that
are not possible. I added a simple example below. First two count values are
correct, third is not possible, as you can see. Have you ever seen anything
like this?
I've discussed this with several colleagues but this is something new for them also. This has been hard to believe for them also, so they have tried these by themselves. Some queries give correct results but some doesn't. I've used sqlplus, Oracle Enterprice Manager and Toad so the software is not the problem.
SQL> select count(*) from ci_customer;
COUNT(*)
138295
SQL> SELECT count(*) FROM ci_customer WHERE customer_state = 'ACTIVE';
COUNT(*)
135324
SQL> SELECT count(*) FROM ci_customer WHERE customer_type <> 'PERSON';
COUNT(*)
138292
SQL> SELECT count(*) FROM ci_customer WHERE customer_state = 'ACTIVE' AND customer_type <> 'PERSON';
COUNT(*)
4 Received on Thu Nov 14 2002 - 05:06:55 CST