We have a little problem with some data in a particular table. One day the data is ok, and the other day it is not. To be able of trapping the data when it is changing, I was thinking for a trigger.
I could used the profiler, but Profiler tends to show too much data which would be too hard to manage.
With the Trigger, I can go check at the sysprocesses to know which program name has run the problematic query and even capture the computer name. (I haven't construct the trigger yet, but by searching the sysprocesses for runnable process I think I can find the right path to the program running the problematic query.)
The problem is that I will need to know the problematic query. Is there a way to know, within the trigger, which query fired the current trigger ?