SELECT 
s.STC_PARENT AS STC_PARENT, 
s.STC_PARENT_ORG AS STC_PARENT_ORG, 
s.STC_PARENTTYPE AS STC_PARENTTYPE,
s.STC_PARENTRTYPE AS STC_PARENTRTYPE,
s.STC_CHILD AS STC_CHILD, 
s.STC_CHILD_ORG AS STC_CHILD_ORG, 
s.STC_CHILDTYPE AS STC_CHILDTYPE,
s.STC_CHILDRTYPE AS STC_CHILDRTYPE,
s.STC_ROLLUP AS STC_ROLLUP,
(select obj_desc from r5objects where obj_code = s.stc_parent and obj_org = s.stc_parent_org) as STC_PARENT_DESC,
(select obj_desc from r5objects where obj_code = s.stc_child and obj_org = s.stc_child_org) as STC_CHILD_DESC
FROM r5structures s
WHERE
(  (STC_PARENT = <parameter.object> AND STC_PARENT_ORG = <parameter.object_org>)
   OR
   (STC_CHILD = <parameter.object> AND STC_CHILD_ORG = <parameter.object_org>)
)
ORDER BY STC_SEQUENCE ASC
