Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,

I want to know whether i can write a trigger with the system time to execute a
stored procedure .
Please help me with some smaples


Regards
Nirmala devi Saravanan
Posted

You can use SQL Server "Schedule Jobs"

http://www.wiseowl.co.uk/blog/s231/schedule_data_import_in_sql_server_pt3.htm[^]

Basically, write your SQL statement (preferably) in a stored procedure and call it in your job scheduler.


If not clear, let me know and provide more details
 
Share this answer
 
v3
AFAIK, you cannot. They are part of the triggering SQL statement (only through autonomous transactions)

Refer:
http://en.wikipedia.org/wiki/Database_trigger[^]
http://msdn.microsoft.com/en-us/library/ms189799.aspx[^]


If you want something to be executed at a particular time interval, I would suggest you to use a Windows service instead. It can run at the time scheduled and insert/update data in your database.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900