Scaling of decimal value resulted in truncation

ryan180

New member
Local time
Today, 19:31
Joined
Mar 22, 2013
Messages
5
I'm using Access 2003 to create some reports for an insurance company I work for by interrogating the Informix database of our policy maintenance software via an ODBC connection. The linked tables and the fields included within cannot be edited due to permission restrictions (the software is provided by a third party) but this doesn't usually cause issues.

However, I've recently created a Query that extracts a *number* field from one of our database tables, but I'm having trouble due to the 'Scale' attributed to this field in the Access table settings.

Access recognizes that the field is a 'Decimal' type, but attributes a 'scale' of '0' which causes an error. 'Scale' (for those who aren't aware) refers to the maximum number of digits that can appear to the right of a decimal separator, meaning whenever this value exceeds 0 (e.g. if an advisor enters something like 240.51 - a 'Scale' of '2'), the 'Scaling of decimal value resulted in truncation' error occurs.

As mentioned earlier, we don't have the ability to amend the Scale attributed to this value due to permission restrictions, although I'm told that 'Scale' is set in Access and not on the external database anyway.

Does anyone have any ideas on how to bypass this issue? I can't reformat the field as Access attributes the Scale upon the initial linking of the table, long before the field is used in any queries. Permission restrictions also prevent me from amending the 'Scale' value in the linked table settings.

The software house themselves can't assist as they've set this value to hold multiple decimals on the actual database. It's as if Access only checks a small proportion of the fields held in the table (the first few hundred of this particular field are whole numbers) and attributes the scale based on this.

Any assistance would be much appreciated.
 
look at the field definition in the linked access table. you can review it, but not edit it.

what data type is it showing there?
 
See below...

Date Type: Number
Field Size: Decimal
Precision: 16
Scale: 0
Decimal Places: Auto
 
ok - scale 0, as you suspected. I don;t know how you would fix that.

can the software house give any help as to how the field is actually declared within their database?

it may be access wrongly assuming though - it does the same thing when it evaluates excel columns - just uses the first few rows.

the only thing I can think is to trick it, by loading a value that will have a scale in your work table that will sort at the top.
 
For a linked table it is recommended to refresh the link.
 

Users who are viewing this thread

Back
Top Bottom