I need to query a table that as a global Id that goes across many system id's. (So the global id will be repeated for every system ID). and I need to check if that system id value is in two other columns root id and parent id. If its in either column then N else Y. But when I check for system Id value in the two columns in needs to check all records based on global id. On below example i need to check for system id = 12536a3 in root id and parent id columns for all records with global ID 1252z1
global id system id root id parent id
1252z1 12536a3 12536p9
1252z1 12536z3 12536a3
1252z1 12536p9 12536z3
1252z1 12536p9 12536z3 12536z3
Let me know if you need any other details.
thanks in advanced.