Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SELECT help needed
Message
De
19/10/2001 08:19:19
 
 
À
19/10/2001 08:14:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00570729
Message ID:
00570735
Vues:
26
Rui,
You have to add a GROUP BY clause.
Try:
SELECT cod,name,deb,cre,SUM(totdeb-totcre) from tablex GROUP BY cod
HTH
>Hello,
>I need to make a SELECT where i can show the movements and the totals together, like this:
>SELECT cod,name,deb,cre,SUM(totdeb-totcre) from tablex
>
>the TOTDEB-TOTCRE are a SUM and the SUM commmand returns only one record, i dont want that, i want all records, like this:
>
>|cod| name | deb | cre | Sald |
>-------------------------------
>| 1 | aaaa | 10 | 0 | 10 |
>| 2 | aaaa | 0 | 15 | -5 |
>...
>Urgent please, thanks
>Rui Trol
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform