select
case
when (A.SecurityRole_ID is not null) then
(select B.ShortName || ' ' || B.Name from SecurityRoles B where B.ID = A.SecurityRole_ID)
when (A.SecurityUser_ID is not null) then
(select B.ShortName || ' ' || B.Name from SecurityUsers B where B.ID = A.SecurityUser_ID)
else
''
end as DisplayName
from DefaultDocumentParticipants A
where (A.ID = :OBJID)Generated by ABRA Software a.s. 27.10.2021 16:34:08