Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AVG decimal
Message
De
16/07/2004 00:28:57
 
 
À
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:
00925033
Vues:
28
>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?

as is - its a datatype problem ...
even if you try to typecast to decimal during the sql select - i can't gaurantee you'll get a decimal for the answer ...

but ?

if you do a scan..endscan with a typecast - you should get a different answer..
lemme know your results ?
mondo regards [Bill]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform