Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting a decimal or money with commas
Message
 
 
To
30/07/2007 21:38:08
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01244736
Message ID:
01244737
Views:
24
Hi Charles,

T-SQL isn't very good in formating data. Usualy it can be done much easier in frontend. Anyway see if following will work for you
DECLARE @Value int
SET @Value = 25000000
SELECT REPLACE(CONVERT( varchar(32), CONVERT(money, @Value), 1), '.00', '')
>In VFP we can put a picture clause on a transform()
>PADL(TRANSFORM(Ccchexplvl.nocclimit,"999,999,999"),11)
>
>What is the proper way to use CAST or Convert to accomplish the same thing. Basically, want a string with the number showed formatted with commas at thousands etc
>
>TIA
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform