Value exceeds the maximum allowed length of 10
Q: I am using a calculated value in a SQL statement and getting an error such as:
The value, “18.59777195”, exceeds the maximum allowed length of 10.
The SQL select statement looks like this:
select [Itemkey], [WD]*1.6667 as Price,'JBR' as PriceType, [Effective Date]
from [PRICES$]
where [WD] is not null
Is there a way to limit the number of places after the decimal point?
A: Yes. In the SQL, use the Round function like this:
ROUND([WD]*1.6667, 4) as Price
to limit to 4 decimal places.
Revised: 2012-12-17
Copied!