Home Forums SQL Server 2005 T-SQL (SS2K5) Arithmetic overflow error converting varchar to data type numeric. RE: Arithmetic overflow error converting varchar to data type numeric.

  • Hi Craig

    Thank you very much for your help again. I have searched for values 100+ as suggested but nothing came up. I didn't think it was necessary to mention this earlier but I'm starting to think that my problem might be due to all the other data in this column that I'm currently filtering out using WHERE TYPE = 'ABC'. I have this TYPE = 'ABC' in both my main and sub query. Data in this column of other types, excluded by my query, will certainly have values >= 100, along with text and dates. Do you think this might have something to do with it?

    I tried increasing the (4,2) to (18,4) in both queries and received this error: Error converting data type varchar to numeric. Even (6,2) caused this error. I'm surprised that while I don't get any errors when I run either the sub query or the main query independently, as soon as I put them together I get the error. This is what I really don't understand but obviously due to my lack of experience. It would be a great hurdle to get over!

    Thanks again.