Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Triggers

Author  Topic 

vk59
Starting Member

38 Posts

Posted - 2004-02-05 : 05:43:17
Hi,
I need to write a trigger on table which has a text column.I have written "INSTEAD OF INSERT" Trigger. When I insert a row in table I am able to access value in the text column but the problem is the row that i have inserted gets deleted after the trigger is fired.My Requirement i need to maintain log table which stores that history of data i have inserted into the tables.But by using "INSTEAD OF INSERT",After inserting, I have data in log table not in the main table.Please Help me..

Thanks
Vinnu



`

nr
SQLTeam MVY

12543 Posts

Posted - 2004-02-05 : 05:47:12
An insead of insert trigger fires instead of the insert.
You have to repeat the insert in the trigger.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

vk59
Starting Member

38 Posts

Posted - 2004-02-05 : 05:52:27
Working fine... Thanks NR..First time i seeing a forum with speedy responses.Great work

`
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-02-05 : 07:04:55
Those must be lesser forums that you are used to :).

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -