Subject RE: [firebird-support] Count(distinct ...) problem?
Author Chris Voronin
Isnt it DISTINCTCOUNT not COUNT(DISTINCT ....)?
Don't remember the syntax off top of my head though.


-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of eos_dev
Sent: Friday, February 17, 2006 15:18
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Count(distinct ...) problem?

A short example (Firebird v1.5.3):

CREATE TABLE tbl(number INTEGER NOT NULL PRIMARY KEY);
INSERT INTO tbl VALUES(2147483647);

Now:

(1)
SELECT COUNT(DISTINCT number) FROM tbl;

returns this result:

COUNT
============
0

while:

(2)
SELECT COUNT(number) FROM tbl;

is ok (COUNT==1). If number < 2147483647 (2^31-1) everything is
right.

What am I missing? Is this a known bug?


Thanks!








++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links