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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reciprocating Query Match

Status
Not open for further replies.

Fbomb

Technical User
Mar 18, 2002
12
0
0
US
I am challenged with trying to compare data from a row of inputs with another row of inputs for a reciprocating match. Basically, I have a row of data with the first cell being the let's say "SiteIDs" and up to 12 cells that on the same row that are affiliated to the "SiteIDs" that are called “AdjacentIDs”. I need to find which "SiteIDs" are in each others database or Row in this case.

OK, here goes. Here is a sample from the actual database.

SiteID ADJ1 ADJ2 ADJ3 ADJ4 ADJ5 ADJ6
2002 2003 2004 2005 2057 2007 2008
2003 2002 2005 2004 2007 2057 2008
2004 2057 2005 2007 2002 2003 2008
2005 2007 2008 2004 2002 2003 2057

I want to Identify all Sites that are not in each other's adjacency list. Example: Site 2002 has Site 2003 in its list, But is Site 2003 in Sites 2002s list as well? In this case yes, but I want to run a query that queries the whole array.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top