Vinit Patel

Add Currency Symbol to the database value in Sql Server

Posted on: June 3, 2011


Hi,

If you have the Data in Sql table like

Value

15

17

 

Now, If you want to print the values like $15 and $17. So you will have to do like this…

SELECT LEFT(‘$’ + CONVERT(VARCHAR, CAST(‘15.00’ AS MONEY), 1), LEN(‘$’+ CONVERT(VARCHAR, CAST(‘15.00’ AS MONEY), 1)) – 3)

Advertisements
Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Calendar

June 2011
M T W T F S S
« Apr   Jan »
 12345
6789101112
13141516171819
20212223242526
27282930  

Stats Of Blog

  • 6,848 hits

Cluster Map

%d bloggers like this: