Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is select sum() from number Oracle column rounded ?
Message
From
03/12/1999 23:21:04
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
02/12/1999 07:29:00
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00297819
Message ID:
00298593
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform