Use the precision-integer and scale-integer options of the DECIMAL function to specifiy the precision and scale of the result. (You will still get zeroes, just less of them) OR You could use LTRIM to remove zeroes from the resulting string, but if the result is 0000000000000000 you get nothing.