Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How to Make the Count Right
I have 4 tables and a code to count the emx_addr, but the filter seems
to go out of control. The table desc gets the basic columns to
simplify this issue:
TABLE DESC
count(student.emx_addr) alone yields 12,000. But using the following coding yields about 600,000!
coding:
student a,
class c,
dept d,
project p
where
p.cont_id = d.cont_id and c.class_id = d.class_id and c.student_id = a.student_id and p.active_ind = 'Y' and a.emx_addr is not null;
----------------------------------
How to make it right, without restructing the tables?
Appreciated.
Steve Received on Fri Apr 25 2003 - 15:42:08 CDT