On 20 February 2016 at 19:53, jerry foote <[email protected]> wrote:
>
> I have adjusted the code as below and still get error message GROUP BY
> clause is missing or invalid.
> I am running vp8
>
> SELECT manifest_n, bill_of_la, release_no, frm_acct, source, source_id,
> sum(units) as totat FROM SERVICE WHERE manifest_n=2512 AND
> bill_of_la="158401" GROUP BY  release_no INTO CURSOR mytotla

It's because these fields are not in the GROUP BY:
manifest_n, bill_of_la, frm_acct, source, source_id

Technically your SQL is invalid, but older versions of Fox allowed this.

Try:
GROUP BY manifest_n, release_no, bill_of_la, frm_acct, source, source_id

Or use aggregates in the SELECT:
SELECT MAX(release_no), MAX(bill_of_la), release_no, MAX(frm_acct),
MAX(source), MAX(source_id), sum(units) as totat

-- 
Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CADwx0+KTETXvzNUOW0JdJ3+H7Uv==pxhy2xouznggaztk_g...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to