Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQLCMD leave 000s after rounding

Posted on 2008-09-29
1
Medium Priority
?
428 Views
Last Modified: 2009-07-29
Hi

I have a sqlcmd script that runs a simple select query and outputs it to a .csv

However one of the fields rounds using

ROUND(dbo.KASSTRNS.KAS_BETRAG / 1.175, 2, 2) AS Expr2

But when I look at that in the out put file its change for example 1.22222 to 1.22000

Is there any way I can drop the 000 at the end??

Cheers

Brasso
0
Comment
Question by:brasso_42
1 Comment
 
LVL 14

Accepted Solution

by:
Binuth earned 2000 total points
ID: 22594720
cast(ROUND(dbo.KASSTRNS.KAS_BETRAG / 1.175, 2, 2)AS DECIMAL(18,2)) AS Expr2

 
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

876 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