• No bad experience.

    Except when trigger is badly written.

    Like your one. 😉

    You do insert inside of INSTEAD OF INSERT.

    Besides it does not make much sense, if suddenly nested trigger are allowed - you are in trouble, man.

    This will do the same thing but without any risk:

    [Code]

    Create trigger ins_my_table

    on real_table

    FOR INSERT

    AS

    Begin

    Insert into par_table

    select col_list

    from inserted i

    inner join post_Type_lookup p

    on i.doc_type = p.doc_type

    from where do_it = 1

    End

    [/Code]

    Because trigger is a part of INSERT transaction if insert into par_table fails insert into real_table (firing the trigger) will be rolled back as well.

    _____________
    Code for TallyGenerator