x
login about faq Site discussion (meta-askssc)

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 7 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 ♦♦
38.8k 55 69 104

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.

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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1832
x598

asked: May 27 '10 at 08:48 PM

Seen: 640 times

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

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.