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 |
|
sahu74
Posting Yak Master
100 Posts |
Posted - 2005-04-01 : 10:29:59
|
| I have a DTS package that pulls records from another server into a table TBFac on MyServer. I would like to delete all the records from TBFac before I insert the new records after executing the DTS package. How can I do this?Thank you.PKS. |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2005-04-01 : 11:46:39
|
| Add a custom sql step to your package and use "truncate table TBFac"Mike"oh, that monkey is going to pay" |
 |
|
|
sahu74
Posting Yak Master
100 Posts |
Posted - 2005-04-04 : 09:29:36
|
| Thank you Mike.PKS |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-04-04 : 23:34:35
|
Uhhh, are you sure this is a good idea???? From Books Online:quote: The DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row. TRUNCATE TABLE removes the data by deallocating the data pages used to store the table's data, and only the page deallocations are recorded in the transaction log.
Just think about it before you hit GO.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|