|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
round problemHi,
Can someone pls help me on the following problem. How can I take only 8 decimal places on a numeric number? e.g turn 123456.12345678912 into 123456.12345679 turn 1234.123456789123 into 1234.12345679? Thanks in advance. SoccerManic wrote:
> How can I take only 8 decimal places on a numeric number? I take it you tried the obvious (the ROUND() function) and it didn't do> e.g > turn 123456.12345678912 into 123456.12345679 > turn 1234.123456789123 into 1234.12345679? what you want? Yes. I tried the round function but it didn't quite work.
I need only 8 decimal places, pls advice. thanks Show quote "Chris Lim" <blackca***@hotmail.com> wrote in message news:1156497439.129258.30860@h48g2000cwc.googlegroups.com... > SoccerManic wrote: >> How can I take only 8 decimal places on a numeric number? >> e.g >> turn 123456.12345678912 into 123456.12345679 >> turn 1234.123456789123 into 1234.12345679? > > I take it you tried the obvious (the ROUND() function) and it didn't do > what you want? > SoccerManic wrote:
> Yes. I tried the round function but it didn't quite work. ROUND(<value>, 8) works for me.> > I need only 8 decimal places, pls advice. thanks Or do you mean you want to store to 8 decimal places as well? In which case you need to CAST(<value> AS DECIMAL(16, 8)). SoccerManic wrote:
> Hi, Set the precision and scale values for the table columns in the data> > Can someone pls help me on the following problem. > > How can I take only 8 decimal places on a numeric number? > e.g > turn 123456.12345678912 into 123456.12345679 > turn 1234.123456789123 into 1234.12345679? > > Thanks in advance. base, if you have acces to modify the columns: decimal(18,8) HTH |
|||||||||||||||||||||||