Hello,

The following snippet:

    drop table t if exists;
    create table if not exists t (d date);
    insert into t values ('2008-11-01'), ('2008-11-02');
    select null from t group by year(t.d) order by year(t.d);

throws the exception:
    Column T.D must be in the GROUP BY list; SQL statement:

The same problem with the month function (in both "group by" and
"order by" clauses). Nevertheless it works with convert(d, varchar),
for example.

Is it an expected behavior?

Regards,
Jacek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to