Advertisement

06.05.2007 at 10:22AM PDT, ID: 22614305
[x]
Attachment Details

sql 2005 update trigger.

Asked by shayne23d in SQLBase, MS SQL Server, SQL Server 2005

Tags: sql, trigger, update, 2005

Hi all.
I have two table below that I have created.

create table medreason
(
      membid int,
      lastnm varchar(50),
      ident int      
)
create table medreason_bak
(
      membid int,
      lastnm varchar(50),
      medr_ident int,
      change_dt  smalldatetime
      ident_bk  int      
)

I am needing to write a before update trigg? That will take the data from medreason that is being updated and place it into medreason_bak
I am working in sql 2005.
I alsso want it to be able to enter the date and time that the update happened.
Ident_bak will be an identity colun in the medreason_bak table.


Any help would be apreciated.
Start Free Trial
[+][-]06.05.2007 at 10:29AM PDT, ID: 19218700

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2007 at 10:30AM PDT, ID: 19218718

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2007 at 10:38AM PDT, ID: 19218791

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQLBase, MS SQL Server, SQL Server 2005
Tags: sql, trigger, update, 2005
Sign Up Now!
Solution Provided By: dqmq
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32