Solved

sql - decimal 2 digit

Posted on 2014-10-09
3
118 Views
Last Modified: 2014-10-30
How can I convert it from
6.522
11.794

to

6.52
11.79
0
Comment
Question by:VBdotnet2005
3 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 250 total points
ID: 40372015
The context to when you are trying to do this would help and some sql code that you are using.

i.e. are you trying to do this as part of a stored procedure, function or dynamic sql

and posting the sql you do have would help so we don't have to re-invent the wheel
0
 

Author Comment

by:VBdotnet2005
ID: 40372018
Thank you Paul. I figured it out.

CAST([Pord Cost] AS decimal(10, 2)) AS Prod_Cost
0
 
LVL 10

Assisted Solution

by:HuaMinChen
HuaMinChen earned 250 total points
ID: 40372282
Try
select cast(6.522 as decimal(12,2))

Open in new window

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In this article I will describe the Backup & Restore 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.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now