Error 21001, error while writing triggers
-
Hi, A very newbie question to all you learned folks. I am writing a trigger through Enterprise Manager (using the option New Stored Procedure...) The following is my code
create trigger trig1 on table1
for insert
as
select * from table2
goWhen I check the syntax by pressing the Check Syntax button it says Syntax Ok but when I press the OK button to close the stored procedure editor it states the following error
Error 21001:[SQL-DMO]Stored Procedure definition must include name and text (for StandardStoredProcedure or library name for ExtendedStoredProcedure)
Now the stupid question, how do I write a trigger through SQL Enterprise Manager for a particular table.:mad:
-
Hi, A very newbie question to all you learned folks. I am writing a trigger through Enterprise Manager (using the option New Stored Procedure...) The following is my code
create trigger trig1 on table1
for insert
as
select * from table2
goWhen I check the syntax by pressing the Check Syntax button it says Syntax Ok but when I press the OK button to close the stored procedure editor it states the following error
Error 21001:[SQL-DMO]Stored Procedure definition must include name and text (for StandardStoredProcedure or library name for ExtendedStoredProcedure)
Now the stupid question, how do I write a trigger through SQL Enterprise Manager for a particular table.:mad:
What are you really trying to create? A trigger or a Stored Procedure?
Intelligence is almost useless for those who have nothing else! Email: caiokf@gmail.com
-
Hi, A very newbie question to all you learned folks. I am writing a trigger through Enterprise Manager (using the option New Stored Procedure...) The following is my code
create trigger trig1 on table1
for insert
as
select * from table2
goWhen I check the syntax by pressing the Check Syntax button it says Syntax Ok but when I press the OK button to close the stored procedure editor it states the following error
Error 21001:[SQL-DMO]Stored Procedure definition must include name and text (for StandardStoredProcedure or library name for ExtendedStoredProcedure)
Now the stupid question, how do I write a trigger through SQL Enterprise Manager for a particular table.:mad:
If you're creating a trigger, don't use New Stored Procedure in the management studio, instead: - navigate to the table you want to create the trigger on - expand the tree - select Triggers - and then New Trigger option. Mika
The need to optimize rises from a bad design