Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select for a Report
Message
 
 
À
10/03/2003 18:05:50
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:
00763984
Vues:
31
Would this do what you want?
SELECT ficmolde, ficmater, ;
    SUM(IIF( movimento <= 50, Quantidade, 0)) - ;
       SUM(IIF( movimento >=  51, Quantidade, 0)) AS Balance, ;
    from ficmvmp ;
    group by 1,2 ;
    ORDER BY 1,2
>Hi Sergey,
>
>Thank's, Edgar tell me that a few moments ago.
>
>But the query doesn't do what i expected, this query group in one record all the in and out records, what i need is the group customer then by Ref(Product) all in and out records, any chance. If you can see my first question.
>
>Because any customer could have one or more ref(Product) in my stock.
>
>>>>>you query doesn't take in account movimento values of 50 and 51. Is it intentional?
>
>No only test purpose...:)
>
>Thank's for your time..
>
>João
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform