Re: writing audit trail for a table
From: Sa (ksadf_at_sdkaew.org)
Date: 02/28/05
- Next message: Harman: "Re: How can I select rows where the time is midnight"
- Previous message: Uri Dimant: "Re: DataBase reusability"
- In reply to: Aaron [SQL Server MVP]: "Re: writing audit trail for a table"
- Next in thread: Steve Troxell: "Re: writing audit trail for a table"
- Reply: Steve Troxell: "Re: writing audit trail for a table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Feb 2005 15:00:38 +0800
Thanks, Aaron.
That's what I guess. I just wondering is there a better way to do. It is
because there are many fields in the table.
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:BE4805E9.15FD%ten.xoc@dnartreb.noraa...
> I think you would have to compare the before values (in the deleted table)
> to the after values (in the inserted table).
>
>
>
>
> On 2/27/05 11:15 PM, in article usfYWwUHFHA.1476@TK2MSFTNGP09.phx.gbl,
"Sa"
> <ksadf@sdkaew.org> wrote:
>
> > Hello Experts,
> >
> > I am using SQL Server 2000 (SP3). May I ask you a question regarding
> > programming in SQL Server?
> >
> > I have an "Opportunity" table (more than 30 fields with various data
type)
> > and an "AuditTrail" table. Whenever there is an update action to one or
> > more fields in the "Opportunity" table, I have to record each old value
and
> > new value in the "AuditTrail".
> >
> > Is that the commo approach is using "UPDATE" trigger in the
"Opportunity"
> > table?
> > Is there anyway I can know which field(s) will be updated in the
> > "Opportunity" table? Thus, I do not need to compare the old value and
new
> > value for each field in the "Opportunity" table?
> > Is there any sample code?
> >
> > Would you please give me some hints and suggestions? Thank you very
much!!
> >
> > Sa
> >
> >
>
- Next message: Harman: "Re: How can I select rows where the time is midnight"
- Previous message: Uri Dimant: "Re: DataBase reusability"
- In reply to: Aaron [SQL Server MVP]: "Re: writing audit trail for a table"
- Next in thread: Steve Troxell: "Re: writing audit trail for a table"
- Reply: Steve Troxell: "Re: writing audit trail for a table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|