You can convert the money datatype to a numeric with 4 digits of
precision:
select convert(numeric(10,4),moneyfield) from table
go
--
Bret Halford
Sybase Technical Support
3665 Discovery Drive
Boulder, CO 80303
joerg
Converting to numeric(10,4) will yield inaccurate
results because all the values will now have zeros
padded such that they all have 4 digits to the
right of the decimal.
This can be overcome by deteriming the currency
code and applying a conversion to decimal 10,1 or
10,2 or 10,3 or 10,4 depending on the currency
code ( case statement ) but is very unwieldy and
eats up lots of resources.
Isn't there a way to just get the sql server to
display the exact value stored in a money type?
This would be much nicer and faster.
This is currently a huge discussion item on a
system I am working with and the Oracle biggots
are jumpming all over this saying that there
database does display the exact money type stored.
Any ideas ??
gh
In article <374452...@sybase.com>,
Bret Halford <br...@sybase.com> wrote:
> Ramses Palomo wrote:
> >
> > how do i tell sybase in a select statement to
return me the 4 digits of a
> > money field?
>
> You can convert the money datatype to a numeric
with 4 digits of
> precision:
>
> select convert(numeric(10,4),moneyfield) from
table
> go
>
> --
> Bret Halford
> Sybase Technical Support
> 3665 Discovery Drive
> Boulder, CO 80303
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---