Bad Data Format

Database
Enthusiast

Bad Data Format

Hi

we have an amount column that is defined as varchar.

The data coming in has

example:

-5.00000000000000E 000

-0.45

1

I know this is bad data... so when the BO report sums it up on the amount col (sum(amt_col)) i get the bad data format.. At this point the dev team does not want to change the data type to either float or dec... what function should i add in order to display it the whole number as it is

regards

RK

Tags (1)
1 REPLY
Enthusiast

Re: Bad Data Format

try converting it into string and using subtring function get the required number of chars and then convert back it into int and apply Sum. try something like or around this.

hope it works, all the best.