Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select for a Report
Message
From
10/03/2003 18:13:11
 
 
To
10/03/2003 18:05:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00763620
Message ID:
00763984
Views:
32
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform