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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrong # of args in ROUND(value,0,1) ?

Status
Not open for further replies.

Giovaanni

Programmer
Oct 31, 2002
6
US
Hi,

I saw an example of this in the books online for SQL Server and I'm not getting it to work. I'm trying to truncate the number right at the decimal point (no rounding just lop it off). It's coming back at me as having the wrong number of arguments when they do it in the example just fine. What's going on?

Thanks for the help,

Mark.
 
If you look at the example in BOL, you will see that the truncate is not the same as what you think the truncate should be.

 
Here is the example from BOL:

Statement Result
SELECT ROUND(150.75, 0) 151.00
SELECT ROUND(150.75, 0, 1) 150.00

Hope this helps.
 
Hi,

well the method would have worked for me I just wanted to remove the decimal value of the number but I accomplished the same thing by running a CAST on it and changing it from a decimal to an integer.

Mark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top