Denodo is flexible and it offers a way to develop custom stored procedures for implementing the functions that are not available in Denodo.
For this scenario, I would follow the below steps to develop a custom stored procedure:
* I would pass the input query as the input parameter of the stored procedure.
* It would parse it into the main query and the subquery.
* Now, the “Subquery” will be executed in the Virtual DataPort.
* The Resultset of the subquery is stored in a variable and then the main query(Delete from…) is iterated the number of rows that are part of the resultset.
You can refer to [Developing Stored Procedures](https://community.denodo.com/docs/html/browse/6.0/vdp/developer/developing_extensions/developing_stored_procedures/developing_stored_procedures) under ‘Developing extensions’ of the Virtual DataPort Developer Guide.
An enhancement to overcome this limitation is already in Denodo’s roadmap.
Hope this helps!