Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate sum / select sum
Message
De
28/08/2002 13:14:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00694540
Message ID:
00694544
Vues:
10
Try select 000000000.00+NumField.... from ...
If the first result is an integer the resulting field will be integer.


Peter


>I have a cursor built by a Oracle OBDC SELECT statement with three fields report_date ( DateTime), jobcode (text), dt_time (Numeric)
>
>When I look at field dt_time in the cursor it shows as a two decimal places number, But when I highlight that record-field, the number changes to a 0 decimal place number, until I move off of the field.
>
>Even stranger is if I use the calculate SUM(dt_time) it will sum the numbers up correctly, If I use a SELECT SUM(dt_time) it treats each number as a interger or ROUND(dt_time,0) would do just like in the cursor does when you hightlight the field.
>
>IE: Unhightlighted HighLighted
> .18 0
> .38 0
> .50 1
> 2.40 2
> .63 1
> 1.32 1
> 4.42 4
> .17 0
> 0 0
> .01 0
>----------------------------------------------------
>CALCULATE SUM 10.01 SELECT SUM 9
>
>How do I keep the decimal places in this cursor or during a SQL-SELECT?
>
>Thanks
Peter Cortiel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform