January 5, 2006 at 4:46 am
Hi All
im trying for the first time to create a trigger on a view
example:
create view testview
as
select * from somewhere
----------------------
create trigger test
on testview
for update
as
begin
doing somthing ...........
end
......but when i execute the create trigger i get an error :
invald object name 'testview'
are there paramaters a view must have inorder to create a trigger on it.....like indexed view or somthing........
January 5, 2006 at 5:04 am
Hi Oren,
The documentation says 'A view can be referenced only by an INSTEAD OF trigger.':
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_7eeq.asp
So try:
create trigger test
on testview
instead of update
as
begin
doing somthing ...........
end
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy