?
Solved

Overflow error

Posted on 2011-09-15
3
Medium Priority
?
382 Views
Last Modified: 2012-05-12
I keep getting an overflow error on a the below:

SELECT Query1.RCTrack, Query1.RCDate, Query1.RCRace, Query1.Horse, Sum(Query1.RCWT) AS SumOfRCWT, Sum(Query1.NFIN) AS SumOfNFIN, Sum(Query1.RWNF) AS SumOfRWNF, Sum(Query1.RWBEYER) AS SumOfRWBEYER, Sum(Query1.AdjBeyer1) AS SumOfAdjBeyer1, Sum(Query1.AdjBeyer) AS SumOfAdjBeyer, Sum(Query1.NFC) AS SumOfNFC, Sum(Query1.RWFC) AS SumOfRWFC, Sum(Query1.SPEED) AS SumOfSPEED, Sum(Query1.NODDS) AS SumOfNODDS, Sum(Query1.RWOP) AS SumOfRWOP, Sum(Query1.RWSP) AS SumOfRWSP, Sum(Query1.RWPUR) AS SumOfRWPUR, Sum(Query1.RWWT) AS SumOfRWWT, Sum(Query1.RWDST) AS SumOfRWDST, Sum(Query1.NPOST) AS SumOfNPOST, Sum(Query1.ADJLENS) AS SumOfADJLENS, Sum(Query1.RWFINLENS) AS SumOfRWFINLENS INTO [SUMS OF FACTORS]
FROM Query1
GROUP BY Query1.RCTrack, Query1.RCDate, Query1.RCRace, Query1.Horse;


There are 712,000 rows in this.  This is Tracks G through I.  In tracks A through B, I did not get an overflow with the same code.  A through B has 1,310, 000 rows.

0
Comment
Question by:JackJackson54
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
LIONKING earned 2000 total points
ID: 36544428
It appears that it's not because of the rows, but my initial guess would be that one of the fields doesn't support the number that the SUM function is returning...

Have you tried casting your fields to larger values? What are the original field types?
0
 

Author Comment

by:JackJackson54
ID: 36544892
'

They all are double because of decimals
0
 
LVL 13

Expert Comment

by:LIONKING
ID: 36544974
Mmm... Maybe casting them as decimals could help...
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question