|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:11 AM
Points: 877,
Visits: 1,159
|
|
I am using SSIS package to read the data from Access file and import them to SQL Server table. I have total 10 tables that I need to migrate / import to SQL Server. I am using OLE DB Source & OLE DB Destination tasks for this requirement. SSIS Package is working fine and perform the required tasks.
I am using OLE DB Source task to read the data by providing following: OLE DB Connection Manager: AccessDB Connection Data access mode: Table or View Name of the table or the view: tableName
Now, I need to add one more table but it may not present in all the accessdb (mdb) files. Because of table is not present, OLE DB source task throws an error but I would like to ignore that error, insert default data to SQL Server table and go ahead with other tasks.
How can I achieve this functionality in SSIS package?
Thanks
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, January 29, 2013 4:35 AM
Points: 8,
Visits: 93
|
|
Hardy,
Check the table is exist in database before you do the load process. If the table is not exist update a user variable ( create a variable , datatype: bool, default to False) to true. Check this variable in precedence constraint by changing to "Expression" condition.
If you work out the above scenario in For Each loop container passing through all table names, you can load it one by one by evaluating the above condition.
Maharaj

|
|
|
|