Trigger**
From: maryam rezvani (rezvani_at_parskhazar.net)
Date: 11/25/04
- Next message: avnrao: "Re: Trigger**"
- Previous message: Roji. P. Thomas: "Re: Table Variable vs Temporary Table"
- Next in thread: avnrao: "Re: Trigger**"
- Reply: avnrao: "Re: Trigger**"
- Reply: David Portas: "RE: Trigger**"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Nov 2004 09:26:05 +0300
Hi
I've a following trigger which is fired in update status and make all
changes
to a new table successfully,I've a question:
I just want by changing the emp_name column in first table the emp_name in
second
table changes(this happen by login L1 which has permission to the
destination table)
,but when I change the emp_status (by another login which has not access to
the second
table,an error occurred that you have no permission to update the second
table) and that's
correct,but how can I solve my problem ? I don't want to permit the login L2
to the destination
table,but I don't want to recieve such an error like this too,
Any help would be greatly thankful
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
create TRIGGER dummy1
ON [dbo].[emp1]
FOR UPDATE
AS
update emp2 set
emp_name= (select emp_name from inserted)
where
emp_cod= (select emp_cod from inserted)
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
- Next message: avnrao: "Re: Trigger**"
- Previous message: Roji. P. Thomas: "Re: Table Variable vs Temporary Table"
- Next in thread: avnrao: "Re: Trigger**"
- Reply: avnrao: "Re: Trigger**"
- Reply: David Portas: "RE: Trigger**"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|