madcolor
madcolor

Reputation: 8170

SQL Rounding Question

I have the following values being returned in a column.. 0.250000 and 13.000000. I'd like to round the 0.250000 up to 1 and leave the 13 as is. Any easy way to do this since they both fall within the same column?

Upvotes: 0

Views: 1141

Answers (3)

George Mastros
George Mastros

Reputation: 24498

The ceiling function will work well because you want to round to the nearest whole number. For more methods on rounding with SQL Server....

SQL Server Rounding Methods

Upvotes: 2

Kieveli
Kieveli

Reputation: 11075

select CEILING( columnname ) from tablename

Upvotes: 1

Dave
Dave

Reputation: 4597

Your DBMS probably has a CEILING function. Try that.

Upvotes: 2

Related Questions