Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a trigger

Status
Not open for further replies.
Apr 27, 1999
705
US
Hello,

I am new to triggers so I need some help.

I would like to have the trigger run a vbscript file when a certain field that was blank is now filled with a string. So I believe this would happen on an UPDATE. Can someone help?

Thanks ahead.

Fengshui1998
 
It needs to run some system related tasks with certain folders and files.
If this is not possible can you at least post a trigger that would meet the criteria above. I try and figure out what else I could do.

Thanks
 
create trigger trUpdate_tbl1
on tbl1 AFTER UPDATE
AS

;with Updates as (select I.* from Inserted I
INNER JOIN Deleted D
ON I.PK = D.PK
WHERE D.SomeField IS NULL and I.SomeField IS NOT NULL)
-- these are the records that updated Some field from nothing to a value

we can do something with them

PluralSight Learning Library
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top