Quote Originally Posted by Libpgeak
how would you fix this problem?
I would fix the source. If that is not possible, then I will find out what on earth are these negative numbers, and whether they should be rejected, or otherwise how to interpret them. Since r_james14 gave the example of "128 buts its -128", it may be the case that taking the absolute value is enough, hence my conditional suggestion of abs.