![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have created a package that just export a number of tables to an Access Database and it works fine. However, when I rerun the package, I get error message as it cannot create the tables (This is because they are already exists in the Access database). What is a better way for me to handle this problem ? A fellow has suggested creating an 'execute SQL task', that checks for the existence of the table first, and drops it if needed. However, I don't know how to create that task, is it possible to give me some advice ? Thanks |
#3
| |||
| |||
|
|
Are you using the wizard or are you using a package? If the former then in the wizard there is an option to turn off the "Recreate" functionality. If the latter then have a look at the package and find the step that does the CREATE of the tables and remove it. Sure you could look to DROP and then CREATE the tables but that would mean you transfer all rows again all the time basically destroying any work you have done in Access. This may or may not be acceptable. Allan "Jason" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:%23FjvXihpFHA.736 (AT) tk2msftngp13 (DOT) phx.gbl... I have created a package that just export a number of tables to an Access Database and it works fine. However, when I rerun the package, I get error message as it cannot create the tables (This is because they are already exists in the Access database). What is a better way for me to handle this problem ? A fellow has suggested creating an 'execute SQL task', that checks for the existence of the table first, and drops it if needed. However, I don't know how to create that task, is it possible to give me some advice ? Thanks |
#4
| |||
| |||
|
|
Dear Allan, I find that the "Drop and Recreate Table" option is in the Transformation button. I have re-created the DTS package with wizard. It runs with error the first time (There is nothing to drop) but it works fine when I re-run it. Thanks Jason "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:O1xIvthpFHA.3244 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Are you using the wizard or are you using a package? If the former then in the wizard there is an option to turn off the "Recreate" functionality. If the latter then have a look at the package and find the step that does the CREATE of the tables and remove it. Sure you could look to DROP and then CREATE the tables but that would mean you transfer all rows again all the time basically destroying any work you have done in Access. This may or may not be acceptable. Allan "Jason" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:%23FjvXihpFHA.736 (AT) tk2msftngp13 (DOT) phx.gbl... I have created a package that just export a number of tables to an Access Database and it works fine. However, when I rerun the package, I get error message as it cannot create the tables (This is because they are already exists in the Access database). What is a better way for me to handle this problem ? A fellow has suggested creating an 'execute SQL task', that checks for the existence of the table first, and drops it if needed. However, I don't know how to create that task, is it possible to give me some advice ? Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |