![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've used DTS before and had pretty good results importing data from other data stores - however, I've had poor results running the DTS packages that I've saved... Most of it was due to my lack of knowledge, I'm sure, but I need to get something like this running, so now I'm going to where the knowlege is ![]() I need to Import a comma delimited file, in a particular directory, into a table - no problem I can do that with my eyes closed (not really, but you know what I mean) Second - I need to create this as a package so it can be run over and over, each time, removing all data from the table and inserting the new data from the newly replaced comma delimited file. So - #1 is this possible to automate to the level of never having to manually run the package? #2 - does anyone have any tips they can share so I can get this setup (either way)? Thanks |
#3
| |||
| |||
|
|
I would create the DTS package w/ the import/export wizard, then edit the package and change or add a "SQL Task" to execute before the "Connection 1" Connection that clears the contents of the table (truncate table <tablename>, or delete from <tablename>, depending on the permissions of the user running the task). If the table doesn't exist when you create the package, you may have to remove or edit the Create Table SQL Task before the task is created that removes the data from the table. However, the job would still have to be manually run when you wanted it to perform the import, either through Enterprise Manager or through VBScript that starts the DTS package - I'm not sure what you mean by never having to manually run the package. Good luck, Tony Sebion "Elmo Watson" <sputnik75043 (AT) No (DOT) Spam.Yahho.com> wrote in message news:#T9zLB9rFHA.3444 (AT) TK2MSFTNGP12 (DOT) phx.gbl: I've used DTS before and had pretty good results importing data from other data stores - however, I've had poor results running the DTS packages that I've saved... Most of it was due to my lack of knowledge, I'm sure, but I need to get something like this running, so now I'm going to where the knowlege is ![]() I need to Import a comma delimited file, in a particular directory, into a table - no problem I can do that with my eyes closed (not really, but you know what I mean) Second - I need to create this as a package so it can be run over and over, each time, removing all data from the table and inserting the new data from the newly replaced comma delimited file. So - #1 is this possible to automate to the level of never having to manually run the package? #2 - does anyone have any tips they can share so I can get this setup (either way)? Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |