[
https://issues.apache.org/jira/browse/DERBY-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576252#action_12576252
]
Dyre Tjeldvoll commented on DERBY-2085:
---------------------------------------
I believe the error message in question was modified in
------------------------------------------------------------------------
r437070 | djd | 2006-08-26 05:55:39 +0200 (Sat, 26 Aug 2006) | 2 lines
DERBY-883 Enhance GROUP BY clause to support expressions instead of just column
references.
Patch contributed by Manish Khettry - [EMAIL PROTECTED]
------------------------------------------------------------------------
but I could not verify it because I'm no longer able to build revision 437069
with a modern jdk6.
> Misleading error message for non-matching ORDER BY clause in queries with
> GROUP BY.
> -----------------------------------------------------------------------------------
>
> Key: DERBY-2085
> URL: https://issues.apache.org/jira/browse/DERBY-2085
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.6
> Environment: Any
> Reporter: Øystein Grøvlen
> Priority: Trivial
>
> In 10.2, this query gives the following error message:
> ij> SELECT i FROM t GROUP BY i ORDER BY j;
> ERROR 42Y30: The SELECT list of a grouped query contains at least one invalid
> expression. If a SELECT list has a GROUP BY, the list may only contain valid
> grouping expressions and valid aggregate expressions.
> This is misleading since there is no invalid expression in the SELECT
> list. It is the ORDER BY clause that is wrong.
> I have marked this as an regression since the error message in 10.1 is
> more helpful (but still not correct):
> ij> SELECT i FROM t GROUP BY i ORDER BY j;
> ERROR 42Y36: Column reference 'J' is invalid. For a SELECT list with a GROUP
> BY, the list may only contain grouping columns and valid aggregate
> expressions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.