How to Display Decimal Numbers As Money using Transact-SQL

Category > MSSQLSERVER || Published on : Wednesday, October 25, 2017 || Views: 8191 || Display Decimal Numbers as Money with cents Display Decimal Numbers as Money without cents.


Introduction

Here Pawan Kumar will explain How to Display Decimal Numbers As Money using Transact-SQL

Description

In previous post I have explained Swapping of two numbers without using third variable using dotnet with c sharp, ASP.Net: Call JavaScript function when RadioButton is checked or unchecked, How to Call JavaScript function when CheckBoxList is clicked (checked or unchecked) in ASP.NET, jQuery: Call function when CheckBox is checked or unchecked, How to Implement Reorder List (Drag and Drop) using jQuery in ASP.Net, How To Export HTML Table To Excel Using jQuery Plugin, and many more articles.

Now I will explain How to How to Display Decimal Numbers As Money using Transact-SQL

So follow the steps to learn How to Display Decimal Numbers As Money using Transact-SQL

Using :-  Display Decimal Numbers as Money with Cents

SELECT convert(varchar,cast(541777367.100000 as money), 1) as 'Budget'.

Using :- Display decimal numbers as money without cents

SELECT replace(convert(varchar,cast(floor(541777367.100000) as money),1), '.00', '') as 'Budget'

 

Conclusion:

So, In this tutorial we have learned, How to Display Decimal Numbers As Money using Transact-SQL