db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sin(EaTing)," <uss...@gmail.com>
Subject GROUP BY can only be followed by a real column?
Date Tue, 03 Jun 2008 09:38:55 GMT
Hi,

I am trying a statement like:
SELECT count(*) FROM table1 GROUP BY YEAR(table1.the_time);
I found it's OK in systems like DB2. But "syntax error" was given when I
tried on Derby.

So does it mean GROUP BY in Derby can only be followed by a real column
instead of some extra decoration?
And if not, how could I do something like to group by null and not null
like:
SELECT count(*) FROM table1 GROUP BY IS NULL(table1.the_time);

Thanks!

Mime
View raw message