Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISOLATING UNIQUE PARTS

Status
Not open for further replies.

Raptor136

Technical User
Aug 26, 2002
39
US
Hello All,
I have two tables (one is "Work", one is "parts"). The work table focuses on vehicles and the parts table tracks parts ordered for each vehicle. Each Work order has a priority assigned. Each part has a priority assigned. The priority of the part is always equal to or numerically larger than the work order. I need a query to tell me which has received all it's parts only for parts that have equal priority with the work order. The parts table has a rcvd_cd field that is either null, or has an "R" to indicate Received or a "C" for cancelled.

I can find all the R's or C's or Nulls for any part associated with the work order number. But if the priority of the Work order is 06 and it has six parts that have equal priority and ten more that are priority 13; I need to know which 06 Work orders that have got an "R" or "C" code for all 06 parts, while ignoring the priority 13 parts altogether.

Sounds simple, probably is, but I am stumped. Sorry for the long post. Thanks all.

Rap
 
Perhaps you could write your query to include a join on the priority fields. This would give you only records where the proirities were the same. Then apply the "R" or "C" criteria.
 
I will give that a shot. Currently they are joined by work order numbers. Thanks, I'll let you know how it worked out.

Rap
 
Join both.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top