Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
decimals after the period - i.e. 144.55? When I create the column in EM with
the smallmoney datatype, the precision field is grayed out. Isn't there some
way to put a format code like "####.##" somewhere?
Thanks,
Dan D.
Hi Dan
"Dan D." wrote:
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
> decimals after the period - i.e. 144.55? When I create the column in EM with
> the smallmoney datatype, the precision field is grayed out. Isn't there some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
SQL Server will stored smallmoney with 4 decimal places regardless,
formatting output should be done on the client.
John
|||Dan
DECIMAL(5,2) or NUMERIC datatypes
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:01B59869-B53E-4442-97AB-94B376C26390@.microsoft.com...
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only
> 2
> decimals after the period - i.e. 144.55? When I create the column in EM
> with
> the smallmoney datatype, the precision field is grayed out. Isn't there
> some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
|||On 7 May, 14:21, Dan D. <D...@.discussions.microsoft.com> wrote:
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
> decimals after the period - i.e. 144.55? When I create the column in EM with
> the smallmoney datatype, the precision field is grayed out. Isn't there some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
Use DECIMAL/NUMERIC. Avoid MONEY or SMALLMONEY for currency values,
there are two many problems associated with the money types.
Do remember that SQL Server has no real control over how numeric
values are displayed. In all cases it is your client software that
determines display formatting, not SQL Server.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
No comments:
Post a Comment