Skip to Content
0
Former Member
Aug 03, 2016 at 02:09 PM

Build generic DELETE statements with INNER JOIN @ HDB

486 Views

Hi all,

we've migrated our crm system on a hdb. Within a small project I would like to benefit from the hdb performance for the following situation:

- Reorganization/deletion of old table entries which are related to records in other tables.

Old fashioned: I would save the the records to be deleted in an itab and delete dbtab from itab.

Question 1: Is there any smarter way to delete related records over several tables (maybe with something like an inner joins?)

Question 2: Better sounds a generic way. I think about customizing table with the relevant information on how to join the tables where deletion should be performed. Within the customizing tables there are rules how to join. A method then will read the customizing and will construct the 'deletion join'.

Do anyone have any idea how to realize that? Maybe with code examples or hints like 'use sql script' or something else? 😊

Thanks in advance

Daniel