Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Growth percents
Message
From
12/03/2006 03:14:20
 
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01103467
Message ID:
01103510
Views:
20
>Is there something wrong with the result? What did you expect to get?
Here is my dream:
create cursor mycursor (year i,saled i)
insert into mycursor values (1999,1000)
insert into mycursor values (2000,1200)
insert into mycursor values (2001,1800)
insert into mycursor values (2002,900)
insert into mycursor values (2003,2700)
insert into mycursor values (2004,5400)
insert into mycursor values (2005,540)
alter table mycursor add column growth n(5,2)


SELECT MyCursor
m.lnOldYear=MyCursor.Saled
SCAN
    mychange=MyCursor.Saled- m.lnOldYear
    ipercent=100*mychange/m.lnOldYear
    REPLACE MyCursor.growth WITH ipercent
    m.lnOldYear = MyCursor.Saled
endscan
Thank you
Chaim
Previous
Reply
Map
View

Click here to load this message in the networking platform