Solved

T-SQL truncating decimal places

Posted on 2006-11-27
2
1,594 Views
Last Modified: 2008-03-10
i pulling data (numbers) that have 5 decimal places (5204.34000 for example).  these are actually dollar amounts. When i run a query i want to truncate the last 3 decimal places, but only in the results, not in the actual table.

So basically when i look at the results, i want to see 5204.34, but i dont  actually want the values changed in the table (so the table would still have 5204.34000).

 how do i do that?
0
Comment
Question by:sammaell
2 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 18020749
Hi sahnias,


select cast( round (UrColumn, 2) as numeric(10,2))

Cheers!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

895 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

15 Experts available now in Live!

Get 1:1 Help Now