tags:

views:

212

answers:

2

Sign. My tsql kungfu sucks. I have a fee that is of type small money. When I exported as SQL from MS Access the column that represents the fee was stored as text, for example $3.28 was stored as "00000328". When I imported this into MS SQLServer I changed the data type to smallmoney, but it was stored as 328. How do I make all the values on that column to move the "." two digits over to the left.

+1  A: 

divide by 100

Steven A. Lowe
seriously..."how do i turn 328 into 3.28?"...did this guy flunk out of third grade math?
davr
@davr, I wasn't sure how to ask the question and English is not my primary language. Sorry.
Jack
+1  A: 

If I understood you correctly, this should do the trick. Only run it once, though. Replace "table" with the name of your table and "fee" with the name of your column.

update table
set fee = fee / 100.0
tvanfosson
Thank. That's it.
Jack