Overflow Error Message

G

Guest

When I run a query I keep receiving an error message that just says
"Overflow!". Does anyone know the cause of this? I heard it could be
because it is trying to divide by zero but I removed all those possible
sources. The query ran before, but today it will not run. Does anyone know
why or how to fix it?
 
B

Brian

dj said:
When I run a query I keep receiving an error message that just says
"Overflow!". Does anyone know the cause of this? I heard it could be
because it is trying to divide by zero but I removed all those possible
sources. The query ran before, but today it will not run. Does anyone know
why or how to fix it?

I would generally expect an "Overflow" to be caused by an attempt to assign
a value to a variable that is too small for it, e.g. attempting to assign a
value greater than 32,767 to an integer variable. However, it is not
immediately obvious to me how this could happen with a select query (if that
is what we are discussing here, which we may not be). What is the SQL for
your query, and how are you running it?
 
G

Guest

I dont know if this will help but this is the SQL. I changed all the data
types to double, so there are no integers, but it is still saying overflow??
i don't get it!


SELECT DISTINCT Trades.Fund, Trades.Cusip, Trades.Trans, Trades.Shares,
Trades.Net, Trades.Brk, Trades.ED, [cost]/[shares] AS CostPerShareConverted,
[PDay Shr Values].PrevPrice, [prevprice]/100 AS PrevPriceConverted,
Trades.GainLoss, Trades.Cost,
([prevpriceconverted]-[costpershareconverted])*[shares] AS [GL EFF of
Trans1], [gl eff of trans1]+[gainloss] AS [Net GainLoss], Trades.Memo,
Trades.Amort, SharesOutstanding.SO, SharesOutstanding.Fund, Trades.[Coupon
Rate], Trades.Price, [net gainloss]/[so] AS [NAV Impact]
FROM (Trades LEFT JOIN SharesOutstanding ON Trades.Fund =
SharesOutstanding.Fund) LEFT JOIN [PDay Shr Values] ON Trades.Cusip = [PDay
Shr Values].Cusip
WHERE (((Trades.ED)=Date()) AND ((SharesOutstanding.SO)>0));
 
B

Brian

dj said:
I dont know if this will help but this is the SQL. I changed all the data
types to double, so there are no integers, but it is still saying overflow??
i don't get it!


SELECT DISTINCT Trades.Fund, Trades.Cusip, Trades.Trans, Trades.Shares,
Trades.Net, Trades.Brk, Trades.ED, [cost]/[shares] AS CostPerShareConverted,
[PDay Shr Values].PrevPrice, [prevprice]/100 AS PrevPriceConverted,
Trades.GainLoss, Trades.Cost,
([prevpriceconverted]-[costpershareconverted])*[shares] AS [GL EFF of
Trans1], [gl eff of trans1]+[gainloss] AS [Net GainLoss], Trades.Memo,
Trades.Amort, SharesOutstanding.SO, SharesOutstanding.Fund, Trades.[Coupon
Rate], Trades.Price, [net gainloss]/[so] AS [NAV Impact]
FROM (Trades LEFT JOIN SharesOutstanding ON Trades.Fund =
SharesOutstanding.Fund) LEFT JOIN [PDay Shr Values] ON Trades.Cusip = [PDay
Shr Values].Cusip
WHERE (((Trades.ED)=Date()) AND ((SharesOutstanding.SO)>0));

You didn't say how you are running this query. Does the error occur if you
run it as a stand-alone query, or are you using it for something else e.g.
the RecordSource for a report?

However, I'm still thinking divide-by-zero, or some crazy data that causes
an overflow in one of your calculations. If I were you, I would identify
the offending calculation by a process of elimination (i.e. remove the
calculations one-at-a-time until the query works), and then start examining
the fields involved in that calculation for extreme data values.
 

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

Similar Threads

Access Overflow error 3
Numeric Overflow Error 4
Overflow Error message 5
What is does "overflow" warning mean when trying to run a report? 2
Numeric Field Overflow 2
"Overflow" error on SELECT query 5
Overflow 1
overflow 1

Top