Home Forums SQL Server 2008 SQL Server 2008 - General How To Update NUll Enabled Field Without Interfering With The Rest of the INSERT/UPDATE RE: How To Update NUll Enabled Field Without Interfering With The Rest of the INSERT/UPDATE

  • ScottPletcher (4/17/2015)


    The on-going maintenance is higher for an INSTEAD OF trigger, since every column addition or deletion, and some column changes, all requires changes the trigger, which is not the case with an AFTER trigger on only specific columns.

    Agreed on the extra maintenance for INSTEAD OF TRIGGERs. I was just wondering why no one mentioned it as an alternative.

    That's why, for every INSTEAD OF TRIGGER I have, I also have a DATABASE TRIGGER that reminds me of the need to maintain that TRIGGER in the event of a change to the structure of the table the TRIGGER is defined on. Well, one db TRIGGER actually, that has an internal table of tables on watch.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St