Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum of columns
Message
 
 
À
10/05/2007 20:42:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01224403
Message ID:
01224405
Vues:
13
What exactly is the problem and what do you want to receive as your result?


>Hi all,
>
>I have mytable that contains 4 fields:
>
>order  loan   late1 late2  type
>
>11111  2222   1      0     CL
>11111  3333   4      1     CL
>
>33333  4444   5      2     PL
>33333  5555   6      3     PL
>
>44444  6666   8      4     ML
>55555  7777   9      3     ML
>
>I have tried this :
>
>select order,type,sum(late1) as late1x,sum(late2) as late2x from
>mytable group by order,type;
>
>it is not working in order to get :
>
>newtable also contains 3 fields
>
>order  late1x late2x  type
>
>11111  5     1      CL
>
>33333  11    5      PL
>
>44444  8     4      ML
>55555  9     3      ML
>
>Thank you in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform