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 |
|
sr_aneesh
Starting Member
17 Posts |
Posted - 2004-11-19 : 10:59:33
|
| I have a table called Students which gets updated daily ID Name Class Age Admission_Date1 Ams 9 14 11/15/042 Tom 12 19 11/17/043 Job 6 15 11/10/044 Mark 5 14 11/09/045 Steve 1 6 11/08/04and another table called archive with the follwing fieldsName Class Age DateI want to move all records from the Students table to archive two days after the admission_date automatically in the late evening.... on daily basis....what DTS package or Stored Procedure do i need to write to do this also how do i schedule this so that the package runs automatically.... could some one explain this in detail...Also I would highly appreciate if some one could recommaned me some good site to learn Stored Procedures/DTS Package / Scheduling..Thanx in Advance |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-11-19 : 11:15:34
|
| You would use a strored procedure not a dts package.The SP will insert reacords into the archive table then delete those recs from the source table.To schedule the SP look at management in enterprise manager. (sql server agent, jobs) you can create a job with a step to call the SP and schedule it.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
sr_aneesh
Starting Member
17 Posts |
Posted - 2004-11-20 : 00:49:05
|
| Thanx nr..... any good site to learn about SP??? |
 |
|
|
|
|
|