How to make trigger code execute only for a specific application? I was wondering if it is possible to enable a trigger just for my current application and not for any sql executed against the table.

The situation:

There are two applications working on the same database. App1 and App2.

I have a trigger on 'MyTable' which should only be fired when App1 is executing a query, but not when App2 is doing so.
While not a good design, it is doable. You'll need to put logic in the trigger so it causes the code to only be executed when the correct application is connected. 

Create trigger... 
As
    If app_name() = 'something' 
    begin 
        put code here 
    end