>>SELECT invnum, name, SUM(qty) AS qty FROM table GROUP BY Invnum+Name INTO cursor cursorname
>
>This give me the folowing error:
>"SQL: GROUP BY clause is invalid."
>
>It appears that I can not use more than one field in the group by clause. Is this correct?
Hi Einar,
The SQL needs to be
SELECT invnum, name, SUM(qty) AS qty ;
FROM table ;
GROUP BY Invnum, Name ;
INTO cursor cursorname
You must list every field in the GROUP BY that is listed in the SELECT, excepting aggregates such as SUM() or COUNT().