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
 Old Forums
 CLOSED - General SQL Server
 help stripping out decimal point

Author  Topic 

chad
Starting Member

11 Posts

Posted - 2006-04-25 : 09:52:40
hey everyone...

I need help stripping out a decimal point. Can someone help me out?

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2006-04-25 : 09:54:27
post a sample of your data..
Go to Top of Page

chad
Starting Member

11 Posts

Posted - 2006-04-25 : 09:55:42
For example....

I would want to return 184377 for a column that contains 1843.77
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-25 : 10:18:39
Select Number*100?

Madhivanan

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

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-25 : 10:28:10
[code]
If datatype is varchar
select replace(yourcolumn, '.', '')
else
select yourcolumn * 100 -- as suggested by Madhivanan
[/code]



KH


Go to Top of Page

chad
Starting Member

11 Posts

Posted - 2006-04-25 : 10:55:54
thanks, guys!
Go to Top of Page
   

- Advertisement -