Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem view in VFP8.
Message
De
05/12/2003 15:57:49
 
 
À
05/12/2003 15:40:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00856440
Message ID:
00856447
Vues:
11
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform