Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditionaly sum
Message
De
18/08/2006 00:50:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Conditionaly sum
Divers
Thread ID:
01146640
Message ID:
01146640
Vues:
67
Dear Experts

Table1 has following two fields

code -----n(4)
amount----n(2)

The data in both fields is as under

code-------amount
1-------------
1401--------50
1602--------80
2-------------
2202--------40
2808--------10

Now I want to get the sum of 4 digit codes in 1 digit as

1------------130
1401--------50
1602--------80
2-------------50
2202--------40
2808--------10

Explanation
The sum of all digits that are starts with 1 with wll be written in 1 as
The sum of 1401 and 1602 will be written against 1 as 130

1-----------130
1401--------50
1602--------80


Please help
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform