SQL format money with cents, I need the opposite

Joe8915

Registered User.
Local time
Yesterday, 17:21
Joined
Sep 9, 2002
Messages
820
SQL format money with no cents, I need the opposite

The following code is for SQL format money no cents, how do I make it with cents




SELECT TOP (50000) [Award amt] = [Award Amt],

[Award Amount] = LEFT('$' + CONVERT(VARCHAR, CAST([Award Amt] AS MONEY), 1),

LEN('$' + CONVERT(VARCHAR, CAST([Award Amt] AS MONEY), 3))- 3)

FROM tblproclog
WHERE [Award Amt] > 0.0

ORDER BY newid()

Thanks guys
 
Last edited:
If you only include the CAST([Award Amt] AS MONEY), it will give you the field declared as money including dollars and cents.
 
Vassago, thanks work like a charm.
 

Users who are viewing this thread

Back
Top Bottom