Solved

sql - decimal 2 digit

Posted on 2014-10-09
3
131 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
[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
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 11

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 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