Home Forums SQL Server 7,2000 T-SQL Trigger will not export to Excel Spreadsheet RE: Trigger will not export to Excel Spreadsheet

  • I would create a table that holds a flag.

    Have your trigger set the flag

    Set up a schedule job that runs every minute or so with a task that says

    IF EXISTS(SELECT 1 FROM dbo.FlagTable WHERE Flag=1)

    BEGIN

    UPDATE dbo.FlagTable SET Flag=1

    exec your query

    END

    The alternative is to have the trigger start your job but you need to put the check in place to detect if your job is running already. There is a system management view for this but its name escapes me.