I want to convert a varchar(max)
column to decimal(10,4)
.
When I try to use cast
or convert
I am getting an arithmetic overflow exception. The issue is that the data stored in the varchar column may contain different precisions and different scales. For example, 123456789.1234567', 1.12345678 or 123456.1234.
For values like 123456.1234 it is converting with out any issue but for other values I am having some problems.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…