; with money_cte ([Key], [someMoney]) as ( select 1, cast...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

;
with money_cte ([Key], [someMoney])
as
(
    select 1, cast(5.00 as money)
    union
    select 2, cast(5.002 as money)
    union
    select 3, cast(5.0001 as money)
)

select *, CONVERT(varchar, someMoney) AS varchar_version, CONVERT(varchar, someMoney, 2) AS varchar_version2
FROM money_cte

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached