Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 problem with money data type

Author  Topic 

mohan.sriram
Starting Member

2 Posts

Posted - 2007-07-25 : 05:07:25
Hi i have one column in my table with data type as smallmoney.when i am trying to insert price of a book like $99.35 ,it is storing like 99.3500 (with out dollor sign and 4 digit precesion) in data table.but i want exactly like $99.35.Please help me in this...

Thanks in Advance.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-07-25 : 05:19:38
money datatype is 4 decimal places. Don't use money if you want 2 decimal places.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

mohan.sriram
Starting Member

2 Posts

Posted - 2007-07-25 : 06:33:14
if not with money datatype...any alternative for that
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-25 : 06:34:39
decimal(10, 2)

but note that showwing dollar signs is a front end issue.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -