I have a table "trail' that maintains the records of how point a is connected to point b. and if there are any intermediate points the table records them as well. There is a column in trails 'type' that indicates whether this connection is main or backup (type can have only 2 values 'Main' or 'Backup', having backup path is optional) and other column Conn_ID ('Main' and 'Backup' connections will have same Conn_ID) and may or may not pass through some common points.
I want to list all the connections (Conn_ID basically) passing through a point say X (an intermediate point) that will be affected if X is taken out. Is this possible, If so how? let me know if you need more info. Table has almost 140 columns of which only the 2 above are to be used.
I tried using minus and it didn't work. The Logic I applied is below:
select Conn_id from trail where point = 'X'
MINUS
select Conn_id from trail where point in (select distinct(Conn_id) from trail where point = 'X') AND Type = 'Backup'
effectively giving me all the paths (both Main and Backup) passing through X or not having any backup path. Thanks