[AccessD] Unmatched query problem

Kaup, Chester Chester_Kaup at kindermorgan.com
Wed Sep 21 12:34:12 CDT 2005


You are correct I only care about date activated.
>From your response I don't think I made my question clear.
In the Wells_Active table I have a column of dates and a column of
wellnames. These start in March 1995 with a number of wells listed each
month. The result I need is a list (date and wellname) of wells that are
not active each month.

I could probably do it by first building a list of all wells each month
using a Cartesian sum query of dates and well names. I would then do an
unmatched query using both wellname and date.

Was just looking for a better way.

Thanks.
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Wednesday, September 21, 2005 11:54 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Unmatched query problem

I wonder if you've got enough data in the Wells_Active table. I'm
thinking
that a well has both a DateActivated and a DateTerminated column, but
perhaps this is irrelevant to your needs. Assuming from your description
that you care only about when the well was activated, flip the query
around
(of ease of comprehension).
SELECT * FROM Wells_Active INNER JOIN Wells ON WellsActive.WellID =
Wells.WellID
WHERE Wells_Active.DateActivated < [Enter a date]
If you have a DateTerminated column in addition (note the adroit
avoidance
of "as well"), then you want to compare against both dates. 

HTH,
Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: September 21, 2005 12:24 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Unmatched query problem

I have one master table of well numbers. In another table I have well
numbers of wells that are active by date. I need to gat a list of wells
that are not active on each date. The unmatched query wizard does not
care about the date. How might I do this? Thanks

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

 

No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list