User functions can't be used in group by clauses although post 883 we do allow expressions. User functions can be variant-- i.e. return different values given the same arguments  and hence  not applicable  to group on.

m

On 9/15/06, Suavi Ali Demir <[EMAIL PROTECTED]> wrote:
It seems you want all the repeating values next to each other? Would a sort help? Does order by work?
Regards,
Ali


Robert Enyedi <[EMAIL PROTECTED]> wrote:
Does Derby support user functions in GROUP BY clauses?

I'm thinking of the following scenario:

SELECT USER_FUNCTION(t1.column1)
FROM TABLE t1
GROUP BY USER_FUNCTION(t1.column1);

When I tried this with the latest 10.2.1.3 beta version, this is the
error I get:

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.

Any ideas?

Thanks,
Robert


Reply via email to