|
|
|
|
|
|
| Author |
Message |
Rob Verschoor *nix forums addict
Joined: 19 May 2005
Posts: 75
|
Posted: Mon Jul 17, 2006 10:24 am Post subject:
Re: Round-off of a float column
|
|
|
It's not stored in the catalogs. The square brackets are not part of the
identifier, but merely delimiters -- you can always put these around the
name of an existing table and it'll work normally. One side effect is that
reserved words are not recognised as such anymore so you can use 'm as
identifiers.
HTH,
Rob V.
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase
Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase Replication Server Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
mailto:rob@YOUR.SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
"Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY> wrote in
message news:ac4a6$44bb6469$d55d70a1$23136@news.chello.nl...
| Quote: | Use the round() function: this lets you specify how many significant
digits
to round to.
HTH,
Rob V.
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase
Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase Replication Server Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
mailto:rob@YOUR.SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
"mullin" <mullin.yu@gmail.com> wrote in message
news:1152864919.446918.210360@h48g2000cwc.googlegroups.com...
If i want to round off column amount with datatype float of a table,
table1, how can i round it off?
e.g.
amount: 67032 => 67032
amount: 67032.1234 => 67032.1234
amount: 67032.123422 => 67032.123422
amount: 67032.1234228 => 67032.123423
amount: 67032.1234224 => 67032.123422
amount: 67032.123422812 => 67032.123423
amount: 67032.123422489 => 67032.123422
|
|
|
| Back to top |
|
 |
Rob Verschoor *nix forums addict
Joined: 19 May 2005
Posts: 75
|
Posted: Mon Jul 17, 2006 10:19 am Post subject:
Re: Round-off of a float column
|
|
|
Use the round() function: this lets you specify how many significant digits
to round to.
HTH,
Rob V.
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase
Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase Replication Server Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
mailto:rob@YOUR.SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
"mullin" <mullin.yu@gmail.com> wrote in message
news:1152864919.446918.210360@h48g2000cwc.googlegroups.com...
| Quote: | If i want to round off column amount with datatype float of a table,
table1, how can i round it off?
e.g.
amount: 67032 => 67032
amount: 67032.1234 => 67032.1234
amount: 67032.123422 => 67032.123422
amount: 67032.1234228 => 67032.123423
amount: 67032.1234224 => 67032.123422
amount: 67032.123422812 => 67032.123423
amount: 67032.123422489 => 67032.123422
|
|
|
| Back to top |
|
 |
bret@sybase.com *nix forums addict
Joined: 24 May 2005
Posts: 66
|
Posted: Fri Jul 14, 2006 12:10 pm Post subject:
Re: Round-off of a float column
|
|
|
mullin wrote:
| Quote: | If i want to round off column amount with datatype float of a table,
table1, how can i round it off?
e.g.
amount: 67032 => 67032
amount: 67032.1234 => 67032.1234
amount: 67032.123422 => 67032.123422
amount: 67032.1234228 => 67032.123423
amount: 67032.1234224 => 67032.123422
amount: 67032.123422812 => 67032.123423
amount: 67032.123422489 => 67032.123422
|
For purposes of calculation, use the round() function, which will
generate
the FLOAT value that is closes to the desired rounded value (however,
since FLOAT is bases on powers of 2, there may be a small amount of
error).
For purposes of display, use the str() function to convert the value to
an ASCII string.
-bret |
|
| Back to top |
|
 |
mullin *nix forums beginner
Joined: 08 Sep 2005
Posts: 2
|
Posted: Fri Jul 14, 2006 8:15 am Post subject:
Round-off of a float column
|
|
|
If i want to round off column amount with datatype float of a table,
table1, how can i round it off?
e.g.
amount: 67032 => 67032
amount: 67032.1234 => 67032.1234
amount: 67032.123422 => 67032.123422
amount: 67032.1234228 => 67032.123423
amount: 67032.1234224 => 67032.123422
amount: 67032.123422812 => 67032.123423
amount: 67032.123422489 => 67032.123422 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Fri Nov 21, 2008 12:06 pm | All times are GMT
|
|
Loans | Loans | Remortgages | Loans | Adverse Credit Remortgage
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|