Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
langsql
delete from savings_account
where exists
(select 'f' from account a
where a.account_id = savings_account.account_id
and a.global_account_num is null);

delete from savings_performance
where exists
(select 'f' from account a
where a.account_id = savings_performance.account_id
and a.global_account_num is null);

delete from saving_schedule
where exists
(select 'f' from account a
where a.account_id = saving_schedule.account_id
and a.global_account_num is null);

and finally, delete reference to account:

delete from account where account.global_account_num is null;

...