SELECT DISTINCT '20', RC.ID FROM storedocuments A JOIN StoreDocuments2 SD2 ON SD2.Parent_ID = A.ID JOIN StoreDocuments2 RC2 ON RC2.ID = SD2.RDocumentRow_ID JOIN StoreDocuments RC ON RC.ID = RC2.Parent_ID WHERE A.ID = :OBJID union all /* FP */ Select '04', LeftSide_ID from Relations where Rel_def = 1030 AND RightSide_ID = :OBJID union all /* PP */ Select '06', LeftSide_ID from Relations where Rel_def = 1032 AND RightSide_ID = :OBJID union all /* OV */ Select '02', LeftSide_ID from Relations where Rel_def = 1034 AND RightSide_ID = :OBJID union all /* DP */ Select '61', LeftSide_ID from Relations where Rel_def = 1031 AND RightSide_ID = :OBJID union all /* VPV */ Select '08', LeftSide_ID from Relations where Rel_def = 1033 AND RightSide_ID = :OBJID
Generated by ABRA Software a.s. 27.10.2021 16:34:11