>round(myfield,2)
>if myfield = 2.159 . the return result is 2.16 (which is correct)
>However, if myfield =-2.159 , the return result becomes -2.1
>my client complaint the result should be -2.16 , but not -2.1
>
>any round up function for -ve ?
If the field has a sufficient length, then it will store the decimal part correctly; if you try to store -2.159 into a n(4,2) field, you'll get -2.2 (which takes four characters to write, and four you have), don't know how you got -2.1, though. Just widen the field, because the minus sign also takes one character. In a n(5,2) field, it stores correctly, as -2.16.
You could use something like this if you want, though it's unnecessary - your problem is in the width of the field:
lPARAMETERS nnum, ndec
RETURN ROUND(ABS(nnum), ndec)*SIGN(nnum)