There isn't one - the fine manual (from V8) says
grouping-expression cannot include any of the following items:
| A correlated column
| A host variable
| A column function
| Any function that is nondeterministic or that is defined to have | an
external action
| A scalar fullselect
| A CASE expression whose searched-when-clause contains a quantified |
predicate, an IN
predicate using a fullselect, or an EXISTS | predicate

Note column function as part of the list.

The standard solution is to create a view which makes the year and month
into real columns (in the view) and then you can group by the column name in
the view.

Mike



Select Year(Expdate), Month(Expdate) ,
> Category, Sum(Expamt)
> from EXP.EXPENSES
> group by expdate, category
> order by 1 desc, 2 desc, 3
>
> Gives:
>
> 2008            6  Adjustments                            12.68
> 2008            6  Car                                    10.50
> 2008            6  Car                                    18.50
>
> What is the syntax for the group columns when they are functions?
>
> Thanks!
> Lindy
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>
>


-- 
Mike

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to