Deleting Old Extractions

Hi

 

We're looking to delete a lot of our old extractions and are trying to find a way of doing this en mass.

 

So far, I have run a SQL trace and have identified the following sql commands that are executed during an extraction delete.

  • DELETE FROM t_cust_keycode WHERE ka_no =2376 
  • DELETE FROM t_cust_keycode WHERE ka_no =2376 
  • DELETE FROM t_list_extraction FROM t_list_extraction , v_keycode WHERE v_keycode.ka_no =2376 AND v_keycode.keycode_id =t_list_extraction.list_id 
  • DELETE FROM v_keycode WHERE ka_no =2376 
  • DELETE FROM v_keycode_hist WHERE ka_no =2376 
  • DELETE FROM v_ka_header WHERE ka_no =2376 
  • execute ap_get_nextid @type = 'DL'
  • INSERT INTO t_dl_header ( dl_no , dl_dt , pitch_desc , ka_no ) VALUES ( 5822 , {ts '2017-05-22 12:08:00.030'} , 'Deleted' , 2376 ) 

 

Has anyone done anything like this before, or does anyone know if there are any tables that are afftected, that are missing from the above list?

 

Thanks,

Chris.

 

Parents
  • Looks like you've found the same tables I did, via the same method, e.g. I send the each ka_no through a cursor that deletes files from

    impresario..t_list_extraction
    impresario..v_keycode
    impresario..v_keycode_hist
    impresario..v_ka_header
    impresario_cci..T_CUST_KEYCODE

    ... in that order. 

    I've been housekeeping old Exts this way since late 2013, with no ill effects.

Reply
  • Looks like you've found the same tables I did, via the same method, e.g. I send the each ka_no through a cursor that deletes files from

    impresario..t_list_extraction
    impresario..v_keycode
    impresario..v_keycode_hist
    impresario..v_ka_header
    impresario_cci..T_CUST_KEYCODE

    ... in that order. 

    I've been housekeeping old Exts this way since late 2013, with no ill effects.

Children