Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jabedin
Starting Member
28 Posts |
Posted - 2004-04-12 : 23:27:06
|
Hi there,I need to run a stored procedure to collect data from a table and insert into another. I will use system date which will collect data comparing activity_date of the table. - I want only yesterday's data as today may be incomplete. How do I get yesterday's date.- I need to run it overnight through a scheduler. How can I make the automization.Your help will be highly appreciated. Any sample stored Procedure would by greatly appreciated.Regards JayBella VistaNSW-2153 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-04-13 : 00:39:53
|
| Yesterday's date is DateAdd(d, -1, GetDate())To schedule it, open Enterprise Manager, find Management -> SQL Server Agent -> Jobs and right click to add a new job. The dialogs are pretty self explainatory, and Books Online has lots of info.Damian |
 |
|
|
jabedin
Starting Member
28 Posts |
Posted - 2004-04-13 : 03:19:23
|
| Thank you very much Damian. RegardsJayBella VistaNSW-2153 |
 |
|
|
|
|
|