By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,306 Members | 1,673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,306 IT Pros & Developers. It's quick & easy.

Combining data from several fields in a Union Query

P: n/a
I've got a Union Query that pulls data from two different tables for
chemistry and micro testing. The tables containing very similar data but
for reasons not necessary here, cannot be put into one table (differing
types of results mainly)

However, both have date entry fields for varying time stations from an
initial, 2 weeks, 1 month, 2 months through to 24 months. I've written a
Union Query that pulls the dates into a sort of "overall" schedule for each
batch being tested.

What I'd love to do, is run something off this Union Query to allow me to
sort what testing is due for the next (or current) month. My hope is to
have the query ignore any date not within the next month time frame and just
come up with one due date for each test type and batch number. Right now I
need to physically eye ball each date column to see what's due. Right now
there are 17 date columns to show what's either been done or coming up.

Any suggestions ??
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 4 Feb 2005 17:41:47 +1000, "PATGMorris"
<pa*********@optusnet.com.au> wrote:

It appears you are reaping the results of a bad database design. 17
date fields! Why not one, perhaps assisted with a DateType field.
Then you could write a simple and elegant query like:
select MyDateField
from MyUnionQuery
group by DateType
where MyDateField between Date and DateAdd("m",1,Date)

Remember, a relational database is not a glorified spreadsheet.

-Tom.
I've got a Union Query that pulls data from two different tables for
chemistry and micro testing. The tables containing very similar data but
for reasons not necessary here, cannot be put into one table (differing
types of results mainly)

However, both have date entry fields for varying time stations from an
initial, 2 weeks, 1 month, 2 months through to 24 months. I've written a
Union Query that pulls the dates into a sort of "overall" schedule for each
batch being tested.

What I'd love to do, is run something off this Union Query to allow me to
sort what testing is due for the next (or current) month. My hope is to
have the query ignore any date not within the next month time frame and just
come up with one due date for each test type and batch number. Right now I
need to physically eye ball each date column to see what's due. Right now
there are 17 date columns to show what's either been done or coming up.

Any suggestions ??


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.