10-19-2011 11:44 AM
Hi,
I would like to know if there is any special command to delete entries from one database that already exist in another. I've already implemented it selecting the table keys from one database into an internal table and deleting this entries in the other database using the internal table referred. Eventhough, I would like to know if there's a better solution to do that that can prevent me from having a huge internal table.
Best regards,
Nuno Barros
10-19-2011 11:53 AM
No I don't think so ..Any special command through which you can compare two tables data in open sql statements.
Thanx.
Regards
Bibek
10-19-2011 11:53 AM
No I don't think so ..Any special command through which you can compare two tables data in open sql statements.
Thanx.
Regards
Bibek
10-19-2011 1:38 PM
I don't think that there's another way than going the way via internal tables. But function module RS_VERS_COMPARE_TAB will help to compare both tables, so that you don't have to read every single key.
Regards
Nicola
10-19-2011 2:51 PM
Hi,
You could already use an inner join select on both table. This will result in all entries in table 2 that are present in table 1.
Then you would just have to use a delete table2 from table itab...No loop needed here.
Kr,
Manu