Using LEFT and UCASE Together with GROUP BY?

Jasper321

New Member
I am going against a V9 Progress DB using ODBC on Windows with Brio. I have available the functions 'LEFT' and 'UCASE' which I need to use. I can use either one with success but if I try to nest these I get a GROUP BY error or syntax error. I have tried many ways with no success. Is there a work around?
 

Jasper321

New Member
Here is the ODBC SQL that doesn't work:
SELECT AL1.cono, {fn UCASE( {fn LEFT( AL1.whse, 1)} ) } AS WhseLoc, Count (AL1.orderno) FROM PUB.oeeh AL1 WHERE (AL1.cono=1 AND AL1.enterdt >= { fn CURDATE()} -1 AND AL1.stagecd BETWEEN 1 AND 5 AND AL1.ordersuf=0 AND (NOT AL1.custpo LIKE '%@t%') AND AL1.transtype NOT IN ('CR', 'RM')) GROUP BY AL1.cono, WhseLoc

Adding the GROUP BY causes it to error out with a 'Non-Group-By Expression in SELECT' error. If I use only one of the Scalar functions the SQL works fine; the nesting of the functions causes the error...
 
Top