Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Weird "select count(*)..."
Since the column pcg_numlig can be null you must change youe sql if you
want nulls to be be included
in the counting.
Therefore,
change
SQL> select count(*) from plan_comptable 2 where pcg_numcptgen = pcg_numcptgen
3 and pcg_libcptgen = pcg_libcptgen 4 and pcg_typsolde = pcg_typsolde 5 and pcg_duramort = pcg_duramort 6 and pcg_detail = pcg_detail 7 and pcg_numlig = pcg_numlig;
to
SQL> select count(*) from plan_comptable 2 where pcg_numcptgen = pcg_numcptgen
3 and pcg_libcptgen = pcg_libcptgen 4 and pcg_typsolde = pcg_typsolde 5 and pcg_duramort = pcg_duramort 6 and pcg_detail = pcg_detail
and your count will come out right.
Take care,
Bob
Received on Wed Jun 18 1997 - 00:00:00 CDT
![]() |
![]() |