| A neater approach than BCD (which is just silly) would be a data type
| which is fixed point, you specify the denominator. So, if you are dealing
| with currency, you might want 4 decimal places, so set the denominator to
| 10000.
This sounds like a good idea to me, probably even
|
| If you are dealing with old english currency (unlikely :-) then you want
| the denominator to be 240.
|
| Essentially, this should be implemented simply as an integer, with an
| automatic scale on the IO routines.
|
| Alternatively, simply use an integer, and do the scaling in your
| middleware! ;)
|
| CREATE TABLE (a FIXED(10000));
|
| or some such.
|
| Jules
|
| /----------------+-------------------------------+---------------------\
| | Jelibean aka | jules@stripped | 6 Evelyn Rd |
| | Jules aka | jules@stripped | Richmond, Surrey |
| | Julian Bean | jmlb2@stripped | TW9 2TF *UK* |
| +----------------+-------------------------------+---------------------+
| | War doesn't demonstrate who's right... just who's left. |
| | When privacy is outlawed... only the outlaws have privacy. |
| \----------------------------------------------------------------------/
|
|
| ---------------------------------------------------------------------
| Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
| posting. To request this thread, e-mail mysql-thread2113@stripped
|
| To unsubscribe, send a message to the address shown in the
| List-Unsubscribe header of this message. If you cannot see it,
| e-mail mysql-unsubscribe@stripped instead.
|
|
--
.............................................
(_) Tobias Rischer
"===' tobias@stripped
" "
...still.loving.gnu..........................