SELECT
PP.Definition_ID
FROM
GDPRProcessingPermits PP
JOIN DPDefinitions DPD ON PP.Definition_ID = DPD.ID
WHERE
DPD.DataProtectionDriver_ID = :DriverOID and
DPD.IsActive = :IsActive and
DPD.Hidden = 'N' and
(PP.Firm_ID in ({Firms}) or (PP.Person_ID in ({Persons}))) and
(PP.ValiditySuspended = 'N' ) and
(PP.ValidFromDate$DATE >= 1 and PP.ValidFromDate$DATE <= :CurrentDate) AND
(PP.ValidToDate$DATE >= :CurrentDate) Generated by ABRA Software a.s. 27.10.2021 16:34:09