-- This will work only for the range of values
-- between those of the MONEY datatype
-- See CONVERT help for other styles.
declare @i int, @f decimal(8, 2)
select @i = 353532, @f = 100022.23
select convert(varchar, convert(money, @i), 1) as "Formatted Int",
        convert(varchar, convert(money, @f), 1) as "Formatted Float"
        -- Only 2 digits after decimal point
This page was last updated on May 01, 2006 04:28 PM.