Overflow message

G

Guest

I have four similar queries that act on different tables okay. Yet when run
a query that puts them all together, I get a message saying overflow.

Playing about, I can get a query to get three of them to run together, but
can't get the fourth to run with any - yet it runs by itself.

The four queries were generated from the same template - I just changed the
table it was selecting.

Any thoughts? Thx.
 
D

Douglas J Steele

Pretty hard for anyone to offer any suggestions without more details.

What are the individual queries doing? How do you "put them all together"?
What are the field types in the underlying tables?
 
G

Guest

The tables are imported excel spreadsheets - wouldn't know the field types,
tho' am pretty sure that each table is identical in format just with
different customer information.

The queries are pulling through a few of the fields as they stand and
applying a few calcuations to the other. There are a few divisions but have
checked that none of the entries are 0 - also would have thought that this
would have been flagged when running individually.

Combining the queries by using

Select *
From qry1;

Union Select *
from qry2;

Can post the code for the individual queies, but it's pretty messy.
 
D

Douglas J Steele

Nothing obvious occurs to me.

It is possible that qry1 reports a particular field as, say, Integer while
another query reports it as Long Integer. (The field types from the first
query in the UNION are applied to all of the other queries in the UNION)

Try changing the order of the subqueries, or using conversion functions such
as CLng(), CDbl(), etc.
 
G

Guest

I have encountered the same exact problem. I'm using Union Select to combine
them all.

They are all the same field types and I've tried placing them in different
orders to no avail.

A
 

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


Top