select distinct PO2.ID from PaymentOrders2 PO2, PaymentOrders3 PO3 where (PO2.Parent_ID is NULL) and (PO3.Parent_ID = PO2.ID) and (PO3.PDocumentType = :DocumentType) and PO3.PDocument_ID = :DocumentID
Generated by ABRA Software a.s. 27.10.2021 16:34:10