Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding Result To Nearest Integer

Status
Not open for further replies.

PrgrmsAll

Programmer
Apr 8, 2003
180
US
I need to have the following SQL round the result to the nearest integer:

SELECT v_MASTER_FACTOR.FACTOR * CAST(COUNT(Parts.PartsID) AS decimal(9)) AS intResult

Currently it is returning 0.9999999999, I need this to show 1, etc.

Thanks in advance.
 
Or, of course you could use:

select parsename(Value + 0.5, 2)



Hope this helps

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top