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


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

Re: Trigger help

From Johnnyb <john.lutheran@gmail.com>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Trigger help
Date 2012-04-03 05:03 -0700
Organization http://groups.google.com
Message-ID <21622524.1284.1333454612951.JavaMail.geo-discussion-forums@pbcuu8> (permalink)
References <11931752.1474.1333025246004.JavaMail.geo-discussion-forums@pbjv6> <XnsA029F1A89853BYazorman@127.0.0.1> <rtskn757lq99qrt35fcrqosfqejl8j9350@4ax.com> <XnsA02A5FFFF2FBEYazorman@127.0.0.1>

Show all headers | View raw


OK, so there re no UPDATES, only insertions. This is a logfile from an application. For every even, there is a row inserted. When a row is insert3ed with a particular word in a particular column, I want to copy that row to another server.


On Tuesday, April 3, 2012 1:26:12 AM UTC-6, Erland Sommarskog wrote:
> Gene Wirchenko (genew@ocis.net) writes:
> >      Why would this be relevant since the trigger is for after the
> > insertion?  Assuming the above is correct, I think that I am missing a
> > nuance.
>  
> CREATE TRIGGER tri ON tbl AFTER INSERT, UPDATE AS
> 
> Notice the word UPDATE?
> 
> True, I don't know whether Johnnyb wants to handle updates. He only 
> says "when particular text shows up in a particular column". Really what
> mean I don't know.
> 
> 
> -- 
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
> 
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx



On Tuesday, April 3, 2012 1:26:12 AM UTC-6, Erland Sommarskog wrote:
> Gene Wirchenko (genew@ocis.net) writes:
> >      Why would this be relevant since the trigger is for after the
> > insertion?  Assuming the above is correct, I think that I am missing a
> > nuance.
>  
> CREATE TRIGGER tri ON tbl AFTER INSERT, UPDATE AS
> 
> Notice the word UPDATE?
> 
> True, I don't know whether Johnnyb wants to handle updates. He only 
> says "when particular text shows up in a particular column". Really what
> mean I don't know.
> 
> 
> -- 
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
> 
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx



On Tuesday, April 3, 2012 1:26:12 AM UTC-6, Erland Sommarskog wrote:
> Gene Wirchenko (genew@ocis.net) writes:
> >      Why would this be relevant since the trigger is for after the
> > insertion?  Assuming the above is correct, I think that I am missing a
> > nuance.
>  
> CREATE TRIGGER tri ON tbl AFTER INSERT, UPDATE AS
> 
> Notice the word UPDATE?
> 
> True, I don't know whether Johnnyb wants to handle updates. He only 
> says "when particular text shows up in a particular column". Really what
> mean I don't know.
> 
> 
> -- 
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
> 
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

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