select ownerId, ownerType, batchId from tbl_EAI_inboundBatches where fileFormat = 'JMS_610_invoice_detail' and parentBatchId is null and message <> 'Empty File' and queueStatus = 300 and ownerId = 26 order by batchId