Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum of columns
Message
De
10/05/2007 20:42:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Sum of columns
Divers
Thread ID:
01224403
Message ID:
01224403
Vues:
55
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform