Re: Trigger Error
From: Keith (_at_.)
Date: 06/23/04
- Next message: Mingqing Cheng [MSFT]: "RE: Problem With smalldatetime"
- Previous message: Craig G: "Re: Getting a list of Stored Procedures"
- In reply to: Wayne Snyder: "Re: Trigger Error"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 13:57:03 +0100
I am new to SQL - do you have any sample of how I might do this that I can
wrok from?
Thanks
"Wayne Snyder" <wayne.nospam.snyder@mariner-usa.com> wrote in message
news:uV02FkRWEHA.4056@TK2MSFTNGP11.phx.gbl...
> The only way I can think of,,, is to write an INSTEAD of trigger...
>
> The instead of trigger can see the new value of the text field , and you
can
> look up the existing value. Then audit both.
>
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
>
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>
> "Keith" <@.> wrote in message
news:uGrAPjQWEHA.3236@tk2msftngp13.phx.gbl...
> > Is there any way of capturing the previous value of a TEXT column with a
> > trigger to audit the tables fully?
> >
> > Thanks
> >
> > "Hari" <hari_prasad_k@hotmail.com> wrote in message
> > news:usaalfQWEHA.1888@TK2MSFTNGP11.phx.gbl...
> > > Hi,
> > >
> > > You cant do this with the datatype ntext , text and image, because
thse
> > > datatypes are not logged.
> > > so trigger will not get the the previous state of deleted or updated
> > field.
> > >
> > > --
> > > Thanks
> > > Hari
> > > MCDBA
> > >
> > > "Keith" <@.> wrote in message
> > news:ui4phRQWEHA.3024@TK2MSFTNGP09.phx.gbl...
> > > > I am very new to SQL and have been building my triggers based on
> > examples
> > > > people have given me etc.
> > > >
> > > > My trigger is to copy the entire record into an audit table on
> > > > update/delete. Some of my columns are TEXT.
> > > >
> > > > I am getting an error saying:
> > > >
> > > > Server: Msg 311, Level 16, State 1, Procedure
> > > SYS_Individual_AUDIT_Trigger,
> > > > Line 9
> > > > Cannot use text, ntext, or image columns in the 'inserted' and
> 'deleted'
> > > > tables.
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Mingqing Cheng [MSFT]: "RE: Problem With smalldatetime"
- Previous message: Craig G: "Re: Getting a list of Stored Procedures"
- In reply to: Wayne Snyder: "Re: Trigger Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|