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 wouldn't worry as much about values to the right of the decimal, it should round in. It's the ones to the left that'll cause the error. Somehow or another you've got a value of 100+. I'm confused why the > and < failed, but I'll leave that up to you unless you want to post code and errors.

    Personally, I'd break it off the main query and find the problem data rows *first*, so it'd just be a

    select col from table where CAST( col as NUMERIC(18,4))>= 100


    - 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