Subject | sum vs count |
---|---|
Author | James |
Post date | 2004-02-04T05:31:17Z |
Hi
what is the difference between
select "counterno", sum(1)
from "counter"
group by "counterno"
having sum(1) > 1
and
select "counterno", count("counterno")
from "counter"
group by "counterno"
having count("counterno") > 1
I have some on some post here in this forum, that says using the count
will not give you the desired result.
What Iam trying to do here is to find for duplicate record thru counterno.
Any comments is greatly appreciated.
James
what is the difference between
select "counterno", sum(1)
from "counter"
group by "counterno"
having sum(1) > 1
and
select "counterno", count("counterno")
from "counter"
group by "counterno"
having count("counterno") > 1
I have some on some post here in this forum, that says using the count
will not give you the desired result.
What Iam trying to do here is to find for duplicate record thru counterno.
Any comments is greatly appreciated.
James