Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to SELECT and group
Message
De
07/01/2004 19:09:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
07/01/2004 19:03:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00864910
Message ID:
00864912
Vues:
11
>Hi all,
>
>I have this records in a table
>
>
>+--------+-----------+---------+--------+----+
>| Art.   | Descrip.  | Pr.Unit | Quant. |Tax |
>+--------+-----------+---------+--------+----+
>  00001    ABC         12.23      2        1
>  00002    CDS          9.33      1        3
>  00003    C1           2.99      1        2
>  00004    C2           1.44      2        1
>  00005    C3           2.23      1        3
>+--------+-----------+---------+--------+-----+
>
>My question is, how can i group the (Pr.Unit*Quant)*TAX/100 for TAX 1,2,3.. and the Total Value for all TAX 1,2,3,4....

You want totals for each tax type, right? What does the field "Tax" contain; a code for the tax type?

For example:
select Tax, Pr_Unit * Quant as Total;
  from MyTable;
  group by Tax;
  into cursor Temp
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform