﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / AFTER UPDATE TRIGGER / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 18:16:37 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: AFTER UPDATE TRIGGER</title><link>http://www.sqlservercentral.com/Forums/Topic717733-8-1.aspx</link><description>LovelyThank You</description><pubDate>Fri, 15 May 2009 07:36:59 GMT</pubDate><dc:creator>debbie.coates</dc:creator></item><item><title>RE: AFTER UPDATE TRIGGER</title><link>http://www.sqlservercentral.com/Forums/Topic717733-8-1.aspx</link><description>[quote][b]debbie.coates (5/15/2009)[/b][hr]Is there a way that i can create an after update trigger that will detect if there is a corresponding record with a 999 prefix and update that record?[/quote]Try something like this in your triggerupdate bdset AccountName = ins.AccountName, BankBuildingSocietyName = ins.BankBuildingSocietyName , BankAddress = ins.BankAddress , BankPostcode = ins.BankPostcode, BankSortCode = ins.BankSortCode , BankAccountNumber = ins.BankAccountNumber, RollRefNumber = ins.RollRefNumber from BankDtails bdinner join inserted ins on db.ProjectID = convert(int,'999' + convert(varchar,ins.ProjectID))I'm assuming that projectid is an int, if not you won't need the convert statements in the join.</description><pubDate>Fri, 15 May 2009 06:19:24 GMT</pubDate><dc:creator>RP_DBA</dc:creator></item><item><title>AFTER UPDATE TRIGGER</title><link>http://www.sqlservercentral.com/Forums/Topic717733-8-1.aspx</link><description>Can anyone tell me if its possible to do thisI have a table called BankDtails with the following fieldsProjectIDAccountNameBankBuildingSocietyNameBankAddressBankPostcodeBankSortCodeBankAccountNumberRollRefNumberThe field ProjectID will be something like 10024In the same table I may also have a record with a ProjectID of 99910024the second record will always be proceeded with a  999Is there a way that i can create an after update trigger that will detect if there is a corresponding record with a 999 prefix and update that record?I would appreciate any help on this.Thank You</description><pubDate>Fri, 15 May 2009 03:54:55 GMT</pubDate><dc:creator>debbie.coates</dc:creator></item></channel></rss>