>>select MAX(&lcExpr), ; >> upper(&lcExpr) ; >> from (tcAlias) ; >> where not deleted() ; >> &lcFilter ; >> group by 2 ; >> having not empty(&lcExpr) ; >> into cursor (.cCursor) >>>
select MAX(&lcExpr) as field1, ; upper(&lcExpr) ; from (tcAlias) ; where not deleted() ; &lcFilter ; group by 2 ; having not empty(field1) ; into cursor (.cCursor)But remember, this is 99% match to the original, but not 100% equal .
CREATE CURSOR BYBY (AA C) INSERT INTO BYBY VALUES ('a') INSERT INTO BYBY VALUES ('A') SET ENGINEBEHAVIOR 70 SELECT AA,UPPER(AA) FROM BYBY GROUP BY 2 SET ENGINEBEHAVIOR 90 SELECT MAX(AA),UPPER(AA) FROM BYBY GROUP BY 2If you want 100% equal, use SET ENGINEBEHAVIOR 70 with the original select.