select count(p.ID) from MAININVPROTOCOLPOSITIONS mp join partialinvprotocols p on p.MAINPROTOCOL_ID = mp.parent_id join partialinvprotocolPositions pr on pr.MIPPOSITION_ID = mp.ID where p.closed = 'N' and mp.id = :OBJID
Generated by ABRA Software a.s. 27.10.2021 16:34:10