x

Setting up nightly query

I need to setup a SQL script to run nightly. The script starts by creating temp table and it builds up one after the other, and finally dumps the data into a table. The next day it drops the data from the same table, and creates a new data with the same table name. I’m using SQL Server 2005. My question is what would be the best way of achieving this. Please Help. Thanks!

more ▼

asked May 27 '10 at 08:48 PM in Default

sharon gravatar image

sharon
151 11 13 15

(comments are locked)
10|1200 characters needed characters left

1 answer: sort newest

Simply create a SQL Agent job to run the script you have. http://msdn.microsoft.com/en-us/library/ms189237.aspx

more ▼

answered May 28 '10 at 04:19 AM

Fatherjack gravatar image

Fatherjack ♦♦
41.3k 73 77 107

Can this be done using SSIS?
May 28 '10 at 04:32 PM sharon
Not really the same thing. The SSIS package would be something that you would also schedule as for execution via the SQL Agent too.
May 28 '10 at 04:45 PM Fatherjack ♦♦
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1936
x673

asked: May 27 '10 at 08:48 PM

Seen: 1088 times

Last Updated: May 27 '10 at 08:48 PM