I have two tables;
TESTtblRC
+----+--------+--------+---------+
| id | npanxx | RCname | RCstate |
+----+--------+--------+---------+
|  1 | 111111 | ONE    | CA      |
|  2 | 222222 | ONE    | CA      |
|  3 | 333333 | ONE    | CA      |
|  4 | 444444 | TWO    | CA      |
|  5 | 555555 | TWO    | CA      |
|  6 | 666666 | THREE  | CA      |
|  7 | 777777 | FOUR   | CA      |
|  8 | 888888 | FOUR   | CA      |
|  9 | 999999 | FIVE   | CA      |
+----+--------+--------+---------+

TESTtblRCscope
+----+-------------+-------------+
| id | originating | terminating |
+----+-------------+-------------+
|  1 | ONE         | TWO         |
|  2 | ONE         | THREE       |
|  3 | TWO         | ONE         |
|  4 | THREE       | ONE         |
|  5 | FOUR        | FIVE        |
|  6 | FIVE        | FOUR        |
+----+-------------+-------------+

Given an 'originating' I want to return a distinct list of 'RCname'
(from 1st table) that does not match the originating or terminating in
the second table or itself. So, given an originating of 'ONE' I should
return Rcname's FOUR and FIVE (ONE is iteself, TWO and THREE are its
terminatings) TIA!

Jay

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to