SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Can I set the default no of decimal places

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Can I set the default no of decimal places
Author Message
Leslie Benfield



Joined: 07 Feb 2003
Posts: 16

Post Can I set the default no of decimal places Reply with quote

I have a script that does a;

select * from ssrecords_exp

However when this is done the amount filed is
retrieved with four decimal places instead of
two (as in the database).

Is there a way to default the number of decimal places
or would I have to loop through the rows and convert each
to 2 decimal places.

Thanks,

Leslie G. B.

Mon Nov 17, 2003 11:25 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Can I set the default no of decimal places Reply with quote

How do you know it is 4 not 2 and not 6?

As far as I know all decimal datatypes are represented as double values which means values in -1e308..1e308 range with up to 18 digitats after decimal point.

By the way, you can also use "select round(mycolumn, 2) as mycolumn from ssrecords_exp" to round the value to 2 decimal digits after the decimal point.

: I have a script that does a;

: select * from ssrecords_exp

: However when this is done the amount filed is
: retrieved with four decimal places instead of
: two (as in the database).

: Is there a way to default the number of decimal places
: or would I have to loop through the rows and convert each
: to 2 decimal places.

: Thanks,

: Leslie G. B.

Mon Nov 17, 2003 12:26 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.