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 |
|
rammohan
Posting Yak Master
212 Posts |
Posted - 2009-09-14 : 05:50:58
|
| Hi All,i am having a table named tbl1, it will get loaded with thousands of records daily. now i want to flush the entire data for every 7 days periods. please suggest me a way at database sideOne can never consent to creep,when one feels an impulse to soarRAMMOHAN |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-09-14 : 06:03:44
|
quote: flush the entire data for every 7 days periods
Please explain. Do you what to TRUNCATE the table every 7 days? That is, have an empty table.Do you what to retain 7 days worth of data?You can schedule a job in SQL Agent to run once a week. |
 |
|
|
rammohan
Posting Yak Master
212 Posts |
Posted - 2009-09-14 : 06:07:09
|
| i want to truncate the table for every 7 daysOne can never consent to creep,when one feels an impulse to soarRAMMOHAN |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-14 : 06:21:47
|
| Shedule this query as a job to run for every 7 daysTruncate table your_tableMadhivananFailing to plan is Planning to fail |
 |
|
|
rammohan
Posting Yak Master
212 Posts |
Posted - 2009-09-14 : 06:34:54
|
| is there any alternate way with triggers?One can never consent to creep,when one feels an impulse to soarRAMMOHAN |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-14 : 08:32:23
|
quote: Originally posted by rammohan is there any alternate way with triggers?One can never consent to creep,when one feels an impulse to soarRAMMOHAN
What is wrong with a job? MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|