Home Forums SQL Server 2005 T-SQL (SS2K5) Remove decimals from a nondeterministic field RE: Remove decimals from a nondeterministic field
Florian Reischl
SSC-Dedicated
Points: 37301
More actions
April 15, 2009 at 2:31 pm
#978401
slange (4/15/2009)if it is ALWAYS 2 decimals just multiply by 100otherwise cast it to a varchar and then replace '.' with ''😛
slange (4/15/2009)
otherwise cast it to a varchar and then replace '.' with ''
😛
... and if you have to remove other decimals after the first both try FLOOR:
SELECT FLOOR(234.740423 * 100)
Greets
Flo