Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub Total
Message
From
18/12/2006 09:40:37
 
 
To
18/12/2006 09:31:59
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01178537
Message ID:
01178544
Views:
19
>Dear Sir,
>
>I want to show it into Grid.
>
>Please help

You should certainly improve this code, but basically it will do what you want:
ALTER table testsub ADD COLUMN listorder C(1)
INDEX on name+listorder TAG gridorder
SELECT name,sum(amount) as amount,sum(bill) as bill FROM testsub ;
INTO CURSOR totals GROUP BY 1
INSERT INTO testsub (listorder,name,bill,amount) ;
SELECT 'S' as listorder,name,bill,amount FROM totals
USE in totals
CALCULATE SUM(amount),SUM(bill) TO nAmount,nBill IN testsub
INSERT INTO testsub (listorder,name,bill,amount) ;
values('T','zzz','nBill,nAmount)
INSERT INTO testsub (listorder,name,bill,amount) values('T','zzz',nBill,nAmount)
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform