Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #946

Re: Trigger help

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From bradbury9 <ray.bradbury9@gmail.com>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Trigger help
Date Thu, 29 Mar 2012 15:46:57 -0700 (PDT)
Organization http://groups.google.com
Lines 15
Message-ID <1935751.3379.1333061218074.JavaMail.geo-discussion-forums@vbgu10> (permalink)
References <11931752.1474.1333025246004.JavaMail.geo-discussion-forums@pbjv6>
NNTP-Posting-Host 37.133.94.90
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1333061586 2605 127.0.0.1 (29 Mar 2012 22:53:06 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Thu, 29 Mar 2012 22:53:06 +0000 (UTC)
In-Reply-To <11931752.1474.1333025246004.JavaMail.geo-discussion-forums@pbjv6>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=37.133.94.90; posting-account=jIl9nQoAAAA9P37IIqQq64yAx-2NQYiu
User-Agent G2/1.0
X-Received-Bytes 1691
Xref csiph.com comp.databases.ms-sqlserver:946

Show key headers only | View raw


El jueves 29 de marzo de 2012 14:47:26 UTC+2, Johnnyb  escribió:
> I need to create a trigger that will fire when particular text shows up in a particular column. Then I need to copy that row to another table. Not sure how to do this. Any help would be greatly appreciated.

You cannot make the trigger fire when a particular data is set, it will fire always. The way to do it the way you like it is make a trigger with an IF inside and checking if that column has the text desired.

Create trigger trigger_name on table_name 
[for|after] update
as 
begin

end

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Trigger help Johnnyb <john.lutheran@gmail.com> - 2012-03-29 05:47 -0700
  Re: Trigger help Johnnyb <john.lutheran@gmail.com> - 2012-03-30 07:35 -0700
  Re: Trigger help bradbury9 <ray.bradbury9@gmail.com> - 2012-03-29 15:46 -0700
  Re: Trigger help Erland Sommarskog <esquel@sommarskog.se> - 2012-04-02 23:45 +0200
    Re: Trigger help Johnnyb <john.lutheran@gmail.com> - 2012-04-02 15:04 -0700
      Re: Trigger help Erland Sommarskog <esquel@sommarskog.se> - 2012-04-03 07:33 +0000
    Re: Trigger help Gene Wirchenko <genew@ocis.net> - 2012-04-02 20:52 -0700
      Re: Trigger help Erland Sommarskog <esquel@sommarskog.se> - 2012-04-03 07:26 +0000
        Re: Trigger help Johnnyb <john.lutheran@gmail.com> - 2012-04-03 05:03 -0700
        Re: Trigger help Gene Wirchenko <genew@ocis.net> - 2012-04-03 08:17 -0700
    Re: Trigger help Johnnyb <john.lutheran@gmail.com> - 2012-04-04 07:05 -0700
      Re: Trigger help Erland Sommarskog <esquel@sommarskog.se> - 2012-04-04 23:45 +0200
      Re: Trigger help Gene Wirchenko <genew@ocis.net> - 2012-04-04 14:58 -0700
        Re: Trigger help Erland Sommarskog <esquel@sommarskog.se> - 2012-04-05 09:08 +0200
          Re: Trigger help Johnnyb <john.lutheran@gmail.com> - 2012-04-05 06:06 -0700
            Re: Trigger help Gene Wirchenko <genew@ocis.net> - 2012-04-05 08:24 -0700
            Re: Trigger help Erland Sommarskog <esquel@sommarskog.se> - 2012-04-05 23:51 +0200
          Re: Trigger help Gene Wirchenko <genew@ocis.net> - 2012-04-05 08:19 -0700

csiph-web