Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AVG decimal
Message
 
To
15/07/2004 14:28:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00924843
Message ID:
00924847
Views:
9
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform