stored procedures for adding/deleting extractions

Does anyone know of an SP that deletes Extractions?  I'd rather not have to run down all the tables referencing extractions by myself...

Parents
  • Does anyone know of an SP that deletes Extractions?

    This is part of a larger sproc; I wrote these tables down after finding them via a Profiler trace:

    while @n <= @count
    begin
    select @current_id = ka_no from @del_ids where ka_counter_no = @n

    DELETE FROM t_list_extraction
    FROM impresario..t_list_extraction
    ,impresario..v_keycode
    WHERE v_keycode.ka_no = @current_id
    AND v_keycode.keycode_id = t_list_extraction.list_id

    DELETE FROM impresario..v_keycode WHERE ka_no = @current_id

    DELETE FROM impresario..v_keycode_hist WHERE ka_no = @current_id

    DELETE FROM impresario..v_ka_header WHERE ka_no = @current_id

    DELETE FROM impresario_cci..T_CUST_KEYCODE WHERE ka_no = @current_id

    set @n = @n + 1;
    end

  • Thank you Chris!  Just got confirmation that there is no internal Tessitura procedure for this, oddly, so this will save me a lot of time.

Reply Children