|
Hi everyone,
I need to come up with an SQL statement that will compare a set of values in one tables and find a matching set of rows in another table. The relationships go like this:
A work order contains 15 fields defined as zoned 4.2 that are called procedure numbers.
A traveler document has a many to one relationship with the traveler procedure table. The relevant fields from this table are traveler ID number and procedure number, defined the same as in the work order table.
Given a work order number, I need to find all traveler ID numbers whose related traveler procedure table records match those from the work order table, including being in the same sequence.
Or in lovely ASCII art:
__________________________________
| WO# | PROC 1 | PROC 2 | PROC 3 |
----------------------------------
| 1 | 1.01 | 1.02 | 1.03 |
----------------------------------
matches:
________________
| TRAV# | PROC |
----------------
| 123 | 1.01 |
----------------
| 123 | 1.02 |
----------------
| 123 | 1.03 |
----------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.