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.

  • I'm sorry, but without having the data and the database in front of me to help figure out what exactly is going on there, I'm afraid I'm at a loss. I could only assume your where clauses have to do with on which side your conversion calculation is occuring, pre- or post- data filtering, but that doesn't make a lot of sense even to me.

    The only 'easy way' out I could see without digging into your structure and data is (*twitch*) to create an actual numeric column next to the other field, and run an update through your table to push numbers only into the field (CASE WHEN ISNUMERIC(@field) = 1 THEN @field ELSE NULL END), and use THAT field for these conversions.

    Sorry I can't help you more on this one.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA