Example 2:
Load data from excel source into table.
if we choose drop and create table option during edit mappings. every time when we run the package table gets created with the latest data and can execute any no of times.
We can create a package that run any no of times w/o error by choosing "create table option" also by following procedure.
Click on edit sql and edit the text as follows
if not exists(select * from sys.tables where name="table name")
create....
............
It is called as [on fly table creation]
Now if we run the package with table already existing, no errors occurs and data gets appended
Example 3:
load data from table to table.
If table already exists in destination and we want to transfer data then only "append data option" is chosen . By this option if table not there in destination then error occurs when we execute the package.
Limitations of import and export data wizard:
1) only one source and destination, no complex transformations,user control not possible
Load data from excel source into table.
if we choose drop and create table option during edit mappings. every time when we run the package table gets created with the latest data and can execute any no of times.
We can create a package that run any no of times w/o error by choosing "create table option" also by following procedure.
Click on edit sql and edit the text as follows
if not exists(select * from sys.tables where name="table name")
create....
............
It is called as [on fly table creation]
Now if we run the package with table already existing, no errors occurs and data gets appended
Example 3:
load data from table to table.
If table already exists in destination and we want to transfer data then only "append data option" is chosen . By this option if table not there in destination then error occurs when we execute the package.
Limitations of import and export data wizard:
1) only one source and destination, no complex transformations,user control not possible
Comments
Post a Comment