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
 General SQL Server Forums
 New to SQL Server Programming
 Triggers for Select statement

Author  Topic 

mziqbal
Starting Member

3 Posts

Posted - 2007-03-01 : 03:16:03
We have triggers for Insert, Update and Delete, so that we can check which record is going to inserted, updated or Deleted.

Is there any way so that we could check "From which values the data has been selected ?"

Thnks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-01 : 03:18:24
No such trigger.

What is your requirement ?




KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-01 : 03:18:45
"From which values the data has been selected ?"



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

mziqbal
Starting Member

3 Posts

Posted - 2007-03-01 : 03:20:22
I wants to Check Sql Query.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-01 : 03:26:48
Not possible at least in SQL 2000. In SQL Server 2005, you can do this by writing a DDL trigger and using EVENTDATA() function.

Anyway, why you want the query which fired the trigger? to maintain log ?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-01 : 03:38:59
quote:
Originally posted by mziqbal

I wants to Check Sql Query.



use the profiler


KH

Go to Top of Page
   

- Advertisement -