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
 General SQL Server Forums
 New to SQL Server Programming
 How to cnvert money to int

Author  Topic 

amitagnihotri
Starting Member

1 Post

Posted - 2009-09-26 : 09:55:56
hi all,
i want to know that how to convert money value for eg 78.0000 to 78.

Amit Agnihotri

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-26 : 10:04:25
select convert(int,78.0000) -- gives 78
select convert(int,78.9999) -- gives 78




No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

winterh
Posting Yak Master

127 Posts

Posted - 2009-09-28 : 09:46:41
Select convert(int, Money_Column)

[ /fail at query]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-29 : 02:26:24
or

select floor(col) from your_table

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

winterh
Posting Yak Master

127 Posts

Posted - 2009-09-29 : 10:52:04
What is FLOOR??? Madhavanan, please explain. What is Floor()?

[ /fail at query]
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-29 : 10:53:32
http://msdn.microsoft.com/en-us/library/ms178531.aspx


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

winterh
Posting Yak Master

127 Posts

Posted - 2009-09-29 : 10:56:29
Cheers. Lovely. Bon Appetite. Sweet as a nut. Thanks. DankE.

[ /fail at query]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-30 : 02:00:48
quote:
Originally posted by winterh

What is FLOOR??? Madhavanan, please explain. What is Floor()?

[ /fail at query]


If you are surprised about the word floor, there is also a function called ceiling

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -