Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AVG decimal
Message
 
À
15/07/2004 14:28:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00924843
Message ID:
00924847
Vues:
8
Has the file indicates:
Use the Integer field type for non-decimal numeric values where performance and table storage limitations are especially important.
Try this:
create cursor mycursor(gamename c(5),quantity n(10,2))
insert into mycursor values ('fdss',1)
insert into mycursor values ('ghrr',1)
insert into mycursor values ('gersd',1)
insert into mycursor values ('few',2)
select avg(quantity) from mycursor
>Help please!
>Why don't I get 1.25 in the following syntax:
create cursor mycursor(gamename c(5),quantity i)
>insert into mycursor values ('fdss',1)
>insert into mycursor values ('ghrr',1)
>insert into mycursor values ('gersd',1)
>insert into mycursor values ('few',2)
>select avg(quantity) from mycursor
>I get integer(1) not 1.25, why?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform