Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 get trigger code

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-10-14 : 07:52:48
I created a trigger and I want to alter it
How can I get the existing code of that trigger so that I can alter it?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-14 : 08:15:19
In Object Explorer.
Expand the database.
Expand the table.
Expand the triggers.
Right click on your trigger and choose modify.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-14 : 08:23:03
exec sp_helptext 'trigger name'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-10-14 : 08:29:04
I dont' see any there
if i do SELECT * FROM sys.triggers
GO

I do get my trigger name but I need the syntax
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-14 : 08:30:04
So you have not read our posts?!


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-10-14 : 08:42:55
must have posted at the same time

thanks -madhivanan that was what i was looking for
Go to Top of Page
   

- Advertisement -