SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Automatic Update of tables based on date
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jmr
Starting Member

USA
5 Posts

Posted - 03/19/2006 :  20:29:43  Show Profile
I am new to sql server,

I need to be able to have a trigger or something trigger an event to update some tables every day at let say 12:00 pm. The trigger will then check a table for the end date and if it is = then begin to move information around. Does anybody know how to do this, or if it is possible. I have not been able to find anywere were I can do this. I don't know triggers very well and am not sure if this can be done with that.


Please Help!!!!

khtan
In (Som, Ni, Yak)

Singapore
17642 Posts

Posted - 03/19/2006 :  20:33:46  Show Profile
You don't need trigger. Trigger is executed on the event of INSERT, UPDATE or DELETE action on a table.

You can perform what you required in a Stored Procedure and have that stored procedure scheduled it to run a every day at 12:00 PM.



KH

Choice is an illusion, created between those with power, and those without.
Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant

Go to Top of Page

jmr
Starting Member

USA
5 Posts

Posted - 03/19/2006 :  20:38:47  Show Profile
How do I schedule this to run every day? Do I do it threw the Sql agent jobs, if so how do I do it when my server is hosted on another site?
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17642 Posts

Posted - 03/19/2006 :  20:43:55  Show Profile
"How do I schedule this to run every day?"
You can scheduled it via Enterprise Manager.

"how do I do it when my server is hosted on another site?"
Register the remote server in your local Enterprise Manager and managed it from your local




KH

Choice is an illusion, created between those with power, and those without.
Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant

Go to Top of Page

jmr
Starting Member

USA
5 Posts

Posted - 03/19/2006 :  20:48:32  Show Profile
Do I schedule it with the Sql Server Agent?
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17642 Posts

Posted - 03/19/2006 :  20:55:24  Show Profile
yes. Management - SQL Server Agent - Jobs



KH

Choice is an illusion, created between those with power, and those without.
Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant

Go to Top of Page

jmr
Starting Member

USA
5 Posts

Posted - 03/19/2006 :  21:01:48  Show Profile
Thank you,
How would I call a stored Procedure named "Daily Check". Should I use the activeX Script for the step type and use Visual basics to call the stored procedure?
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17642 Posts

Posted - 03/19/2006 :  21:16:47  Show Profile
When you create a new job, under the Steps tab page, use TSQL and enter under command
exec your_stored_procedure



KH

Choice is an illusion, created between those with power, and those without.
Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant

Go to Top of Page

jmr
Starting Member

USA
5 Posts

Posted - 03/19/2006 :  21:27:29  Show Profile
Thanks!
I will try that
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000