Richards
asked on
How to check triggers and edit them
Hi
I have 3 trigger which have to be updated. I can see then when
sp_help triggername.
How do I view edit delete them
I have 3 trigger which have to be updated. I can see then when
sp_help triggername.
How do I view edit delete them
Using Query analyser, u can run the procedure
exec sp_helpText 'urTriggerName'
copy the result and paste it in another window, change "CREATE' to 'ALTER' do ur modifications, run it
Method2
Use QA -> Press F8 -> expand ur table -> triggers
right click on the trigger and select edit the contents in a new window
exec sp_helpText 'urTriggerName'
copy the result and paste it in another window, change "CREATE' to 'ALTER' do ur modifications, run it
Method2
Use QA -> Press F8 -> expand ur table -> triggers
right click on the trigger and select edit the contents in a new window
ASKER
I am using sql server 2000
both of the above posts are for SQL server 2000
ASKER
Thanks when I change some SQL s inside the trigger and run it I am getting the below error. Do I need to drop and create it ?
Server: Msg 2714, Level 16, State 5, Procedure trgName, Line 65535
There is already an object named 'trgName' in the database.
CREATE TRIGGER trgName
ON tableName
AFTER insert, update
AS
DECLARE @var int
.
.
.
/*
Commented some sqls
*/
Server: Msg 2714, Level 16, State 5, Procedure trgName, Line 65535
There is already an object named 'trgName' in the database.
CREATE TRIGGER trgName
ON tableName
AFTER insert, update
AS
DECLARE @var int
.
.
.
/*
Commented some sqls
*/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
do I need to commit
no.
the form opens and show the defaul "new trigger".
in the combo box however you will find the other triggers, select them, and the code will appear in the code box...