Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select
Message
From
05/04/2010 15:36:00
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Select
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01458778
Message ID:
01458806
Views:
28
thank you,
i need to accumulate ty2010 every month i mean if i get data(values) for id1=3

i need accumulate y2010 for id1=1 and id1=2 and id1=3 to ty2010 where id1=3

accumulate y2010 for id1=1 and id1=2 and id1=3 and id1=4 to ty2010 where id1=4 to id1=12

i try sum but i can't do it.

>>thank you vey much, it works
>>
>>but i need to add monthly new select as below id1 mean month i have id1=1 to 12
>>SELECT ID1 ,Y2010, cast(0 as int) as Row FROM NEWTEST WHERE ID1=3 AND ID>0 into cursor crs3 readwrite
>>replace all Row with recno() in crs3
>>
>>how i can fix this select if id1=3 and id1=4 to id1=12
>> select c2.ID1, c2.Y2010 + c1.Y2010 as Total from crs2 c2 ;
>>inner join crs1 c1 on c2.Row = c1.Row into cursor crsResult nofilter
>>
>>
>>
>I think we may want to re-write the whole algorithm to do this in one pass. Are you trying to create Year to date columns? So, id2 will get sum of id1 and id2, id3 sum of id1, id2, id3, etc. ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform