Question

  Asked: Mar 13 2008   6:50 AM GMT
  Asked by: Barend IT


Daily trigger in SQL


SQL, Triggers

I'm trying to create a trigger to execute daily and calculate a few averages for me. Please help!

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



This would be a stored procedure not a trigger. You can not schedule triggers to run on a schedule. Create a stored procedure with the code needed to calculate the averages and then use the SQL Server Agent to schedule the stored procedure to run nightly.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development and Database.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Mrdenny  |   Mar 13 2008  10:27AM GMT

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.