ODBiC Discussion Board


Problem using derived column name in Group By

by Leonard Harris, June 29, 2006 15:26

Having difficulty using a derived column name in a Group By clause. Statement is: <!--select count(*) as cnt, counselorid, mid(shortdate,1,2) + "/" + mid(shortdate,7,4) as newdate from meetings group by newdate, counselorid-->

Error msg is: You tried to execute a query that does not include the specified expression 'mid(shortdate,1,2)+"/" + mid(shortdate,7,4)' as part of an aggregate function.

Also tried: <!--select count(*) as cnt, counselorid, mid(shortdate,1,2) + "/" + mid(shortdate,7,4) as newdate from meetings group by mid(shortdate,1,2) + "/" + mid(shortdate,7,4), counselorid-->

This 2nd one worked fine in native Access, but again does not work in ODBScript. Seems like perhaps odbc is demanding some unique syntax, and I haven't hit on it yet.

Awaiting any input.

Lenny Harris


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.