On June 30, 2015 12:18:27 AM EDT, Sytze de Boer <[email protected]> wrote: >This has worked fine for many years > >mcols="XD"+ALLTRIM(STR(trcask13)) >SELECT date,pcode,cycle,SUM(gross) as gross, SUM(tax) as tax, >SUM(ROUND((gross+nontgross)*(&mcols/100),2)) as super, &mcols as >mpercent >FROM palldets ; >WHERE BETWEEN(cycle,trcask2,trcask3) ORDER BY pcode group BY pcode INTO >TABLE temp > >Why does this give me grief >mcols="XD"+ALLTRIM(STR(trcask13)) >mmvu ="XD"+ALLTRIM(STR(trcask14)) >SELECT date,pcode,cycle,SUM(gross) as gross, SUM(tax) as tax,; >SUM(ROUND((gross+nontgross)*(&mcols/100),2)) as super, &mcols as >mpercent ; >SUM(ROUND((gross+nontgross)*(&mmvu/100),2)) as volsup,&mmvu as volp >FROM >palldets ; >WHERE BETWEEN(cycle,trcask2,trcask3) ORDER BY pcode group BY pcode INTO >TABLE temp > >in this instance, mcols is XD11 and mmvu is XD39 >Both XD11 and XD39 are fields in a table. > >As you can see, I'm simply adding 2 more columns to the temp table
Styze, I would first say the group by isn't valid. However, you don't have date or cycle in the grouping. This suggests you are not in VFP 9, or you have set the engine behavior to be an older version. You showed us code, you didn't share with us the failure symptoms. Tracy -- Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ 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/[email protected] ** 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.

