Depending on the datatype of val you may need to do some convertion.
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Well the best way would be to put this in a Userdefined function.
I would Lop off the last 5 places before the decimal point and anything after the decimal point if you have one.(Use Left, Len functions to get this accomplished, if decimals it gets more complicated, you probably need the charindex and right functions too in oder to get exactly what you need.) Then I would multiply by .1 to get a decimal in it and then use the round function.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.