Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select for a Report
Message
 
 
À
10/03/2003 18:35:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00763620
Message ID:
00764021
Vues:
22
That's exactly what this query supouse to do. I've no idea why you get one record.
SELECT Customer, Product, ;
    SUM(IIF( movimento <= 50, Quantidade, 0)) - ;
       SUM(IIF( movimento >=  51, Quantidade, 0)) AS Balance, ;
    from ficmvmp ;
    group by 1,2 ;
    ORDER BY 1,2 ;
    INTO CURSOR crsReporty
>Hi Sergey,
>
>No, this group all balance in one record.
>
>I give you an Ex this is what my table ficmmvp have, only these 3 records
>in breaks are the values,
>
>Customer (9999) movimento(05) Quantidade(100) Product(IS0001)..in
>Customer (9999) movimento(55) Quantidade(050) Product(IS0001)..out
>Customer (9999) movimento(05) Quantidade(250) Product(IS1000)..in
>Customer (1000) movimento(05) Quantidade(150) Product(IS0001)..in
>
>
>Report,
>
>Customer 9999
>Product    Stock
>IS0001        50
>IS1000       250
>
>Customer 1000
>Product    Stock
>IS1000       150
>
>
>so, in this case the report must have 3 lines (the select need to give 3 lines to do the report)
>
>Thank's
>
>João
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform