Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Growth percents
Message
De
12/03/2006 03:14:20
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01103467
Message ID:
01103510
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform