Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

Here there is the procedures:

PROCEDURE deleteRecord(I_ID_MISURA IN <table>.ID_MISURA%TYPE) is
  begin
  
    DELETE from <table1> t
      WHERE t.id_misura = I_ID_MISURA;

    DELETE from <table2> t
      WHERE t.id_misura = I_ID_MISURA;

    DELETE from <table3> t
      WHERE t.id_misura = I_ID_MISURA;

  end deleteRecord;

  
Here there is the procedure that call the above one:

  PROCEDURE deleteRecordsOld is
  begin
    for amis in (select id_misura from <table> where D_MISURA < to_date('01/01/1000', 'DD/MM/YYYY')) loop
      <user>.LOG('deleteRecordsOld: delete measure: '||amis.id_misura, 'DEBUG');
      deleteRecord(amis.id_misura);
    end loop; 
  
  end deleteRecordsOld;

LOG is a PROCEDURE.

Average (1 Vote)
The average rating is 5.0 stars out of 5.