I am trying to write a query which generates the Delete query automatically based on the requirements. I will get To be deleted data from different tables and dump into temp