If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Scaling of decimal value resulted in data truncation
I created several queries to calculate unit cost and then extended cost
depending on the number of units. The queires ran fine when it was a small sample size, as soon as I extended the sample size to the complete table I get the error "Scaling of decimal value resulted in data truncation". The calculating fields are set to standard and 2 decimal places. The data is linked with an ODBC connection. |
#2
|
|||
|
|||
Jeannethe, I'm not sure what has caused the particular problem you describe,
but nothing would be surprising working with Decimal fields in Access. It can't even perform a basic sort on this data type: http://allenbrowne.com/bug-08.html and in A97 the data would just disappear if you tried to programmatically assign Decimal type data to display in a form or report. Presumably you have Precision set to some large number such as 28, and Scale set to 2, and you are fully aware that any maths performed on the field will result in no more than 2 decimal places. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jeannethe" wrote in message ... I created several queries to calculate unit cost and then extended cost depending on the number of units. The queires ran fine when it was a small sample size, as soon as I extended the sample size to the complete table I get the error "Scaling of decimal value resulted in data truncation". The calculating fields are set to standard and 2 decimal places. The data is linked with an ODBC connection. |
#3
|
|||
|
|||
Allen Browne wrote:
as soon as I extended the sample size to the complete table I get the error "Scaling of decimal value resulted in data truncation". Jeannethe, I don't think the data type is at fault here, rather your rounding rule (or the one atomically applied for you). You shouldn't have any problems if you explicitly round/curtail your values according to your column's scale and precision. Do you have any test data with which we can reproduce the problem? nothing would be surprising working with Decimal fields in Access. It can't even perform a basic sort on this data type Allen, inability to sort negative values in descending order (easily worked around using suitable type casting) does not condemn a data type. Jet uses the DECIMAL data type internally so it is unavoidable anyhow g. Jamie. -- |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aligning data with varying decimal places | edpaul | General Discussion | 1 | February 11th, 2005 12:42 AM |
How to measure the distance between two lat and long points | A new kind of measurement | Running & Setting Up Queries | 6 | January 14th, 2005 04:45 PM |
Pass through Query:Invalid precision for Decimal Data Type error | Harold Joseph | Running & Setting Up Queries | 1 | December 3rd, 2004 03:19 PM |
Is this possible with Excel Chart? | q582gmzhi | Charts and Charting | 1 | September 8th, 2004 03:33 AM |
Mial merge data base problems | Rachael | Mailmerge | 16 | May 21st, 2004 06:22 PM |