The GROUP BY clause does not support Memo or General fields. The GROUP BY clause must list every field in the SELECT list except for fields contained in an aggregate function, such as the COUNT( ) function. In addition, the GROUP BY clause must also list every field in a HAVING clause except for fields contained in an aggregate function. For example, the following code raises an error because the field company is not listed in the GROUP BY clause. SELECT company, country FROM Customer GROUP BY country You can include an aggregate function in the SELECT list without having it in the GROUP BY clause. For example, the following code uses the COUNT( ) function on the field company without having the field company in the GROUP BY clause. SELECT COUNT(company), country FROM Customer GROUP BY country>I have read the documentation and several articles. I still can not get the following code to work.
>lcReocrdRange = ' ' && in real code this is a calculation >Select building.name , ; > master.roomnum , master.invnum , master.oldinvnb , ; > master.objname , master.surdte , master.surdte2 , ; > master.objmat , ; > master.objdesc , ; > padr(reduce(CHRTRAN(CHRTRAN(master.objdesc , ; > CHR(13),''), CHR(10),''), SPACE(1)),254) AS desc , ; > department.name AS deptname ; > From master, building, department ; > Where building.code = master.inscode ; > AND department.code = master.deptcode ; > &lcReocrdRange ; > Group BY building.name , ; > master.roomnum , ; > master.invnum ; > Into CURSOR antiqsum >>I get the an error message that Group by clause is invalid or missing. What am I missing?