The reserve column is a varchar, to perform sums on it I want to cast it to a deciaml. But the SQL below gives me an error
select
cast(Reserve as decimal)
fr
I had this same problem and it turned out to be scientific notation such as '1.72918E-13' To find this just do where Reserve LIKE '%E%'. Try bypassing these and see if it works. You'll have to write code to convert these to something usable or reformat your source file so it doesn't store any numbers using scientific notation.