Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is select sum() from number Oracle column rounded ?
Message
De
03/12/1999 23:21:04
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00297819
Message ID:
00298593
Vues:
16
Pavel,

SQL functions take the format of the first value they see to format a column. To get around this you can

SELECT nMyNumber + 000000.0000 AS nMyNumber, ;
PADR(cMyShortString, 50) AS cMyLongString, ......


>Hi,
>I have a table on Oracle with column number(13,2).
>example:
>_sqlexec("create table bla (bla number(13,2))")
>_sqlexec("insert into bla values (3.14)")
>after
>_sqlexec("select * from bla")
>I've got number 3.14
>but after
>_sqlexec("select sum(bla) from bla")
>I've got number 3
>and
>_sqlexec("select to_char(sum(bla)) from bla")
>return
>char 3.14
>
>Why sum() function rounded values ?
>Pavel Poul
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform