Solved

Can I format ,000 in SQL?

Posted on 2009-07-09
3
484 Views
Last Modified: 2012-05-07
Hi

Select amount from transactions

It shows 5000050

Can it be shown 5,000,050 ?

Can the query be formatted to do it?

I use MSSQL 2005
0
Comment
Question by:techques
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 50 total points
ID: 24814034
DECLARE @v2 DECIMAL (36,10)
SELECT @v2 = 13243543.56565656

SELECT CONVERT(VARCHAR,CONVERT(MONEY,@v2),1) --13,243,543.57
0
 

Author Closing Comment

by:techques
ID: 31601609
excellent! it is exactly what I need
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24820308
glad to help,

Ritesh Shah
www.SQLHub.com
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server Agent Job Error 13 82
Report 8 27
SQL Server 2012 and core licensing 5 31
learning MS SSIS 13 23
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question