Sql

Asked • 04/04/19

Truncate (not round) decimal places in SQL Server?

I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example: declare @value decimal(18,2) set @value = 123.456 This will auto round @Value to be 123.46....which in most cases is good. However, for this project I don't need that. Is there a simple way to truncate the decimals I don't need? I know I can use the left() function and convert back to a decimal...any other ways?

1 Expert Answer

By:

Phillip A. answered • 02/19/21

Tutor
4.9 (10)

Sr. Systems Engineer with 15+ years experience applying SQL technology

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.