I have a table called records and it contains three columns:
ID Ref1 Ref2
-- ---- ----
01 abcd efgh
02 efgh ijkl
03 ijkl qrst
04 qrst ""
05 1234 5678
06 5678 9999
07 9999 8888
The result I am trying to achieve is: when I select record 01, I would like to see all related records. Records are related through Ref1 and Ref2, therefore the result of selecting record 01 would be records 01 to 04; if I select record 02 I should still see records 01 to 04; if I select record 05 then I would see records 05 to 07 etc.
Constraints: I use access as the database and asp .net web pages as the 'front end'. If it can't be done using SQL, then VB.net or C# can be used.