In the SQL Server type mappings, "decimal" is mapped to "decimal(18,2)".
I have some decimal data with more than 2 decimal places, and this type mapping causes data loss when the data is accessed in a trigger.
The maximum precision of a Decimal in SQL Server is 38, so I'd suggest using this. The choice of scale is more subjective, but I'd suggest using 10 - this would still allow for 28 digits before the decimal place, a significant increase on the current value. Thus, I'd suggest using a type mapping to "decimal(28,10)".
In the SQL Server type mappings, "decimal" is mapped to "decimal(18,2)".
I have some decimal data with more than 2 decimal places, and this type mapping causes data loss when the data is accessed in a trigger.
The maximum precision of a Decimal in SQL Server is 38, so I'd suggest using this. The choice of scale is more subjective, but I'd suggest using 10 - this would still allow for 28 digits before the decimal place, a significant increase on the current value. Thus, I'd suggest using a type mapping to "decimal(28,10)".