Arithmetic overflow error converting numeric to data type numeric

后端 未结 5 1353
灰色年华
灰色年华 2020-12-08 18:06

I keep getting this error message everytime I run this query:

Msg 8115, Level 16, State 8, Line 33
Arithmetic overflow error converting numeric to data type          


        
5条回答
  •  执念已碎
    2020-12-08 18:31

    Use TRY_CAST function in exact same way of CAST function. TRY_CAST takes a string and tries to cast it to a data type specified after the AS keyword. If the conversion fails, TRY_CAST returns a NULL instead of failing.

提交回复
热议问题