Hi,
I am using below select query to get the trigger definition from the database, but it doesn't retrieve the schema name, instead, the definition only has trigger name. Could someone let me know how to fix this issue in SQL 2008?
SQL code which is being used currently:
select obj.name, [definition] from sys.sql_modules m inner join sys.objects obj on obj.object_id=m.object_id
where obj.type='TR' AND OBJECTPROPERTY(obj.object_id, 'ExecIsTriggerNotForRepl') = 0
AND OBJECTPROPERTY(obj.object_id, 'IsMSShipped') = 0
output:
Create Trigger TR_INSERT_NAME ON Employee INSTEAD OF INSERT AS
INSERT INTO TEST.dbo.Adventure (
number, name, salary
SELECT xyz
Thanks In Advance.
Kranthi