At 18:22 9/30/2004 -0400, PLB wrote: >Error: SQL: Group by clause is missing or invalid. > >SELECT INVDTE , ; > INVNO, ; > gLASST, ; > ARSTAT,; > IIF(ARSTAT = "V",(0* extweight),SUM(extweight)) AS ntotweight; > FROM (gcarpath + "ARTRAN" + gcCompID) ; > HAVING BETWEEN(INVDTE,dBeginDate,dEndDate) ; > INTO DBF (gcdatpath + 'tmpdata') ; > GROUP BY INVDTE, INVNO, gLASST ; > ORDER BY INVDTE, INVNO, gLASST
Because of the way you've buried your SUM() inside an IIF(), it may be confused (I know I am!). Have you tried it with ENGINBEHAVIOUR set to 70?
What does the (0* extweight) do? I can't find that notation in Help, nor do I understand what difference it makes whether ARSTAT = "V" or not. You are grouping by ARSTAT, so the "V"s will be separated anyway.
Dan Covill San Diego
©2004 Dan Covill |