sql - trigger creation gives error -
i have sql server management studio 2012 , im trying create trigger on existing database, test created table "prueba" , im trying set trigger (by right clicking database, calle veritrax , hitting "new query"). query:
create trigger items_insert on [dbo.prueba] insert set xact_abort on insert openquery(webdb, 'select * prueba') select id, name inserted go
however, i'm getting error:
*msg 8197, level 16, state 4, procedure items_insert, line 1 object 'dbo.prueba' not exist or invalid operation.*
what wrong query? appreciated
edit: oh god, sorry pasted old error message, error made reference prueba.dbo not tlbaccessareas!
old question, i'm surprised nobody spotted it. dotted notation not correct, i.e.: [dbo.prueba]
should [dbo].[prueba]
:
create trigger items_insert on [dbo].[prueba] insert set xact_abort on insert openquery(webdb, 'select * prueba') select id, name inserted go
Comments
Post a Comment