Click here to Skip to main content
15,913,836 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to transfer list of tables from one database to another database along with data. If table exist in destination database drop it and create with source table structure and copy data from source table. Table list can be specified in .txt file.

SSIS package loop through each element in the list and drop destination table if exists only, create table with source structure and copy data from source database.
Posted
Updated 17-Jun-13 20:26pm
v2

1 solution

So what is your problem??,
1. you can very well loop via for-each and can trace the table names from the .txt file.
2. And run a batch file transformation drop the table in destination database( make sure that drop only if they exists, use If exists with the drop constraint)
3. pull the data to the new table as-
Select * into [port address].[DestinationDatabaseName].dbo.DestinationTableName from [port address].[DatabaseName].dbo.SourceTableName


OR
Use data flow task to do it.


Hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900