Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transform number to string in dollar format
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00961098
Message ID:
00961101
Views:
6
Michel,

Try
 PADR(TRANSFORM(FromValue, "@$ 999,999") + " - " + ;
         TRANSFORM(ToValue, "@$ 999,999"),32) AS DisplayValue,
>I'm having trouble finding the syntax to return a dollar-formatted string (commas, dollar sign) from an integer value.
>
>What I have now is:
>SELECT STR(FromValue) + ' - ' + STR(ToValue) AS DisplayValue, STR(AssetsCode,2,0) AS cValue...
>
>which returns a 'displayvalue' of "1000 - 25000"
>
>But I want it to return "$1,000 - $25,000"
>
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform