By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,266 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,266 IT Pros & Developers. It's quick & easy.

money data type

P: n/a
I choose a price field as a money data type, but I cannot change the
scale of this.
the default scale is 4 (it dimmed).
how can I change to 2? I only need 2 scale such as $23.33 instead of
$23.3344

Jun 1 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If you want the scale to be 2, instead of using MONEY you might want to
consider using DECIMAL or NUMERIC datatype with the required precision &
scale.

--
Anith
Jun 1 '06 #2

P: n/a
HandersonVA wrote:
I choose a price field as a money data type, but I cannot change the
scale of this.
the default scale is 4 (it dimmed).
how can I change to 2? I only need 2 scale such as $23.33 instead of
$23.3344


Use the DECIMAL(<precision>,<scale>) instead of the MONEY data type. E.g.:

sales_price DECIMAL(9,2)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Jun 2 '06 #3

P: n/a
SQL
Also the money data type is not a good candidate since there are some
rounding issues with it. Numeric/decimal is the way to go
Denis the SQL Menace
http://sqlservercode.blogspot.com/

HandersonVA wrote:
I choose a price field as a money data type, but I cannot change the
scale of this.
the default scale is 4 (it dimmed).
how can I change to 2? I only need 2 scale such as $23.33 instead of
$23.3344


Jun 2 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.