Objektová akce

Kód:
8
Tělo:
SELECT 
  DISTINCT '30', B.Parent_id 
FROM 
  storedocuments2 A 
  JOIN storedocuments2 B ON A.id = B.rdocumentrow_id 
WHERE 
  A.Parent_ID = :OBJID
  
UNION ALL 
Select 
  '04', LeftSide_ID 
from 
  Relations 
where 
  REL_DEF = 1011 AND RightSide_ID = :OBJID 

UNION ALL
Select 
  '06', LeftSide_ID 
from 
  Relations 
where 
  REL_DEF = 1012 AND RightSide_ID = :OBJID

UNION ALL 
Select 
  '02', LeftSide_ID 
from 
  Relations 
where 
  REL_DEF = 1013 AND RightSide_ID = :OBJID

UNION ALL 
Select 
  '12', LeftSide_ID 
from 
  Relations 
where 
  Rel_def = 1014 AND RightSide_ID = :OBJID 

UNION ALL 
Select 
  '64', LeftSide_ID 
from 
  Relations 
where 
  Rel_def = 1021 AND RightSide_ID = :OBJID
  
UNION ALL
SELECT 
  DISTINCT A.ProvideRowType, A.Provide_ID
FROM
  StoreDocuments2 A
WHERE
  A.Parent_ID = :OBJID AND
  A.Provide_ID IS NOT NULL    

Generated by ABRA Software a.s. 27.10.2021 16:34:10