How do I access values from the inserted and deleted tables ,when wrting a trigger?
Consider the following trigger written on table CONFIG_PROJECTS.The trigger is created successfully but doesnt fire.
ALTER TRIGGER [dbo].[UTRG_InitializeResources]
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
declare @pmcode varchar(10)
select @pmcode =(select str_empcode_PM from inserted)
if (@pmcode != null)
insert into TRANS_RESOURCES values(4,@pmcode,null,'WSZ001',40.3,1)