Thanks everyone. Our DBA is on vacation and I noticed it is V7 (though I was sure that what I tried was in the SQL standard).
I went with the view method. It was fine. Lindy -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Bass, Walter W Sent: 17. kesäkuuta 2008 1:43 To: [email protected] Subject: Re: DB2 group by with date functions I don't believe this is quite correct. SUBSTR(), YEAR() and MONTH() are not column functions, they are scalar functions. I believe the problem may be that you cannot even use SCALAR functions in the GROUP BY unless you are in version 8 NEW FUNCTION MODE. Check to see if your site is on version 8 in COMPATIBILITY MODE? Bill Bass United Health Care Greenville, SC ---------------------------------------------------------------------- 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

