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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 recreate data table everytime package runs

Author  Topic 

rajani
Constraint Violating Yak Guru

367 Posts

Posted - 2004-06-09 : 19:22:27
Hi friends
I am using simple DTS package that imports data from foxpro table to sql server.
everytime i run this package i want the table to be recreated in sql server database.
i am wondering how to set that option in my dts package?
any ideas please
many Thanks :)

Cheers

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-06-09 : 19:29:11
No problem

I assume you have a Transform Data task to move the data from FP to SQL. All you need is an Execute SQL task to run before this that drops and recreates the destination table.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-09 : 19:30:12
Create an Execute SQL Task. Have it run DROP TABLE TableName. Connect it with a on success connector to your other tasks.

Tara
Go to Top of Page

rajani
Constraint Violating Yak Guru

367 Posts

Posted - 2004-06-09 : 19:37:57
Hi Timmy
u r very quick.it worked beautifully.(yes i'm using transaform data task)

Hi Tara
I created sql task (which drops a table if already exists and recreates)
and i selected work flow properties on my Transaform data task connector and added abv sql task as precedence.
is that something u r suggesting??
Thanks once again

Cheers
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-09 : 19:45:31
Yes that is what I was suggesting so that the Execute SQL Task will always run first.

Tara
Go to Top of Page

rajani
Constraint Violating Yak Guru

367 Posts

Posted - 2004-06-09 : 19:48:27
Thank you Very much.
By the way i want ur expert advice.what i am currently doing is Importing a bunch foxpro tables to sql server.My question is
is it good idea create separate package for each of these tables?
or
import all tables from one single package?
Thanks

Cheers
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-09 : 19:56:52
I would put them all in one package.

Tara
Go to Top of Page

rajani
Constraint Violating Yak Guru

367 Posts

Posted - 2004-06-09 : 20:41:32
Thanks Tara

Cheers
Go to Top of Page
   

- Advertisement -