Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1671
  • Last Modified:

T-SQL truncating decimal places

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
sammaell
Asked:
sammaell
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
Hi sahnias,


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

Cheers!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now