"Invalid scale" error during Crosstab

B

Bruce Meneghin

I received the error "Invalid scale for decimal data type" while trying to
execute this crosstab query (created with crosstab wizard)

TRANSFORM Sum(INV_ages.Acres) AS SumOfAcres
SELECT INV_ages.period, Sum(INV_ages.Acres) AS [Total Of Acres]
FROM INV_ages
GROUP BY INV_ages.period
PIVOT INV_ages.Age;

INV_ages is a query. I will spare you its SQL for now.

Any clue what might be causing this strange error. I have executed this
query successfully in the past.
 
M

Michel Walsh

Is it possible the SUM generates a value larger than what the given scale
allowed? (You are using decimal data type, not floating point type, yes? )


Vanderghast, Access MVP
 
B

Bruce Meneghin

I don't think so. I was able to end-run the problem by changing the source
query to a make-table query and then doing a crosstab on the table. Thanks
for the thought.
Bruce

Michel Walsh said:
Is it possible the SUM generates a value larger than what the given scale
allowed? (You are using decimal data type, not floating point type, yes? )


Vanderghast, Access MVP


Bruce Meneghin said:
I received the error "Invalid scale for decimal data type" while trying to
execute this crosstab query (created with crosstab wizard)

TRANSFORM Sum(INV_ages.Acres) AS SumOfAcres
SELECT INV_ages.period, Sum(INV_ages.Acres) AS [Total Of Acres]
FROM INV_ages
GROUP BY INV_ages.period
PIVOT INV_ages.Age;

INV_ages is a query. I will spare you its SQL for now.

Any clue what might be causing this strange error. I have executed this
query successfully in the past.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top