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 2005 Forums
 Transact-SQL (2005)
 Trigger Insert help

Author  Topic 

kirank
Yak Posting Veteran

58 Posts

Posted - 2010-06-01 : 01:50:49
hi all i have created a trigger on product table
ones the product get inserted / delete / updated on my table then
all the record get store on one table call "LogManager"

now my question is everything is inserted properly but how i can
store that query on that table

here is my trigger

insert into LogManager(TableName,Status,query) values('product','I', ?)

now i want to store actual query on query column
how i can do that ?

kirank
Yak Posting Veteran

58 Posts

Posted - 2010-06-04 : 04:35:19
quote:
Originally posted by kirank

hi all i have created a trigger on product table
ones the product get inserted / delete / updated on my table then
all the record get store on one table call "LogManager"

now my question is everything is inserted properly but how i can
store that query on that table

here is my trigger

insert into LogManager(TableName,Status,query) values('product','I', ?)

now i want to store actual query on query column
how i can do that ?




any ideas? how i can get the query on my query column .
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-06-05 : 07:13:49
why do you need to store actual query? should it be the data ?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Julien.Crawford
Starting Member

21 Posts

Posted - 2010-06-06 : 23:05:58
You are going to have to rewrite this question.
It is very confusing.
And (as always) provide SQL to create sample tables and sample output if appropriate.
Go to Top of Page
   

- Advertisement -