PL/SQL Code for ISOS by BFS