Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem view in VFP8.
Message
From
05/12/2003 15:57:49
 
 
To
05/12/2003 15:40:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00856440
Message ID:
00856447
Views:
12
>CLeaning up DBC prior to moving an app into VFP8, and the following view is giving me grief as far as the grouping. Can someone let me know what the problem is?

Is it giving problems in VFP8 or before the move?
What is the problem?

if testing in vfp8 and getting the problem, first thing i noticed is that it needs the payroll column in the group by [all non-aggregate columns in select are now required in the group by]

>
>SELECT facilitydata.facilityname AS facility_name, invoices.invdate AS show_date,  ;
>  SUM(invoices.cashpaid+invoices.payroll+invoices.ccard+invoices.pcheck-invoices.salestax-invoices.shipcost) AS TOTAL,  ;
>  ROUND(SUM(invoices.cashpaid+invoices.payroll+invoices.ccard+invoices.pcheck-invoices.salestax-invoices.shipcost)*facilitydata.facrebate*0.01,2) AS facility_rebate,  ;
>  ROUND(SUM(invoices.cashpaid+invoices.payroll+invoices.ccard+invoices.pcheck-invoices.salestax-invoices.shipcost)*facilitydata.discountrate*0.01,2) AS employee_disc,  ;
>  IIF(facilitydata.payroll,"Yes","No ") AS payroll ; 
group by
>  FROM  lposdata!facilitydata ;
>  inner JOIN lposdata!customers    ;
>  inner JOIN lposdata!invoices    ;
>  ON  customers.custnumid = invoices.custnumid    ;
>  ON  facilitydata.facilityid = customers.facilityid;
>  GROUP BY 1,2, 6 ; <--- added 6 here [if i counted right]
>  ORDER BY facilitydata.facilityname, invoices.invdate
>
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform