Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or REPLACE function find_parent_object (obj_x VARCHAR2)
- return varchar2 as parent_obj varchar2(200);
- begin
- select name
- into parent_obj
- from objects
- where level = 2 START WITH objects.name = obj_x
- CONNECT by prior objects.parent_id = object_id;
- return parent_obj;
- end;
- select find_parent_object(name) from objects where name = 'Томас Шелби'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement