Need help with UPDATE Trigger

Posted on 2007-07-22
Last Modified: 2010-03-20
I know in a trigger you can reference an updated value:

CREATE TRIGGER [Propagate Updates Within Groups of records] ON [dbo].[myTable ]
           UPDATE dbo.myTable SET [myField] = (SELECT [myField] FROM INSERTED)
                WHERE a bunch of records meet some criteria

This grabs the incoming value for myField and uses it to propagate the update throughout all the records in the group.

If the incoming value for myField is in INSERTED, is the original value of myField still in place and how can I reference it?
Question by:wsturdev
    1 Comment
    LVL 17

    Accepted Solution

    just one



    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now