Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum of columns
Message
From
10/05/2007 20:42:17
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Sum of columns
Miscellaneous
Thread ID:
01224403
Message ID:
01224403
Views:
59
Hi all,

I have mytable that contains 4 fields:
order  loan   late1 late2  type 

11111  2222   1      0     CL
11111  3333   4      1     CL

33333  4444   5      2     PL
33333  5555   6      3     PL

44444  6666   8      4     ML
55555  7777   9      3     ML
I have tried this :
select order,type,sum(late1) as late1x,sum(late2) as late2x from
mytable group by order,type;
it is not working in order to get :

newtable also contains 3 fields
order  late1x late2x  type 

11111  5     1      CL

33333  11    5      PL

44444  8     4      ML
55555  9     3      ML
Thank you in advance.
Next
Reply
Map
View

Click here to load this message in the networking platform