loop back ready to test. Added new depth column to duty step dependency that is set by insert and update triggers to = the lowest depth of the records parent_duty_step_id as a child_duty_step_id. Hopefully this maintains well thru updates. This then can be uses to show direction, and no stored procedure needed to to determine if loop back or not