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 2000 Forums
 SQL Server Development (2000)
 Instead of Triggers

Author  Topic 

mziqbal
Starting Member

3 Posts

Posted - 2004-05-17 : 13:00:40
Hi,
Can any one help me. I am using this trigger but it gives the error "Incorrect syntax near INSTEAD"

CREATE TRIGGER INSTEAD_OF_UPDATE_TITLES
ON titles
INSTEAD OF INSERT
AS

BEGIN
PRINT 'Object Name: '
END

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-17 : 13:05:33
I don't get an error when I run your code on my machine. Are you running more code than what you posted?

Tara
Go to Top of Page

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-05-17 : 13:07:40
What are you trying to acomplish with this?

Jim
Users <> Logic
Go to Top of Page

JohnDeere
Posting Yak Master

191 Posts

Posted - 2004-05-17 : 13:12:23
If you have other code in the batch make sure to separate the create trigger statement with with go statements

go
create trigger blah blah
blah
blah
blah
end of trigger
go

Lance Harra
Go to Top of Page
   

- Advertisement -