Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by with negative values
Message
 
 
To
03/03/2011 10:28:33
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01502506
Message ID:
01502507
Views:
62
Yes, group by ID, Credit and SIGN(Amount)

>I have a table with this structure and values:
>ID Amount Credit
>1 15 .F.
>1 10 .F.
>2 10 .F.
>2 -5 .T.
>2 5 .T.
>2 25 .F.
>
>I would like to Sum the Amount column and group by ID and Credit. But I want to show negative and positive values separately, so I also want to group on negative or positive.
>
>I would like this as a result: Is this possible?
>ID Amount Credit
>1 25 F
>2 35 F
>2 -5 T
>2 5 T
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform