Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a log of all updates...
Message
From
12/03/2003 10:31:53
 
 
To
12/03/2003 07:01:43
Eudoxio Junior
Hospital Sao Marcos
Teresina, Brazil
General information
Forum:
Microsoft SQL Server
Category:
Security
Miscellaneous
Thread ID:
00764180
Message ID:
00764795
Views:
23
You can create temp table copies of inserted an deleted.

Take a look at this SP, it might be the solution you are looking for:

http://www.developersdex.com/gurus/code/498.asp

BOb


>Ok,
>I've the name of the columns updated so I want to compare the old value and the new value using deleted and inserted tables...
>
>I put the following test statement into the update trigger:
>...
>set @sql= 'select * from deleted'
>exec sp_executesql @sql
>...
>But everytime I update the table the trigger returns
>Server: Msg 208, Level 16, State 1, Line 1
>Invalid object name 'deleted'.
>How can I reference deleted and inserted tables to know which values where changed?
Previous
Reply
Map
View

Click here to load this message in the networking platform