Darrell-
At first, I was wondering why you didn't just post the SQL in your message,
but the picture on the Design grid helps see the bigger picture.
You need to remove tblTrackingSegments and tblAssignmentSegments from your
query and add an IN clause.
WHERE Volume_SeqNo IN (SELECT Volume_SeqNo FROM tblAssignmentSegments LEFT
JOIN tblTrackingSegments ON ... WHERE ...)
In the Subquery, select rows that have an open quality review (and any other
criteria that you need). As long as one row qualifies, your record from
tblVolumeSegments will be included.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of D
Sent: Tuesday, February 05, 2013 3:08 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Count Open Inventory
Greetings All,
I am using Access 2007 SP 2 on Win 7 Enterprise.
I have a database that tracks the workflow for inquiries. There is a query
that tracks the weekly processing providing the beginning inventory,
quantity received, quantity processed, and the ending inventory. There is
also a quality reveiw element to the database. A manager has decided that if
an inquiry has been closed by the analyst but has an open quality review,
the inquiry should still count as an open inventory item.
My problem is that it is possible for an inquiry to have multiple quality
reviews. My question is how do I count an inquiry only once as either
processed or open if there are multiple quality segments attached to the
inquiry?
I will post the SQL for my current query that gathers the data to the Needs
Assistance folder.
Darrell
------------------------------------
Yahoo! Groups Links
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar