4 tables in databse
hai , i have 4 tables in databse. this meta data is same. i have to load these tables data into destination table. what is the best approch. plz let me know
January 27th, 2011 11:45pm

you should loop through tables, probably you have a list of source tables, for example you listed them in a flat file or excel file .... so this is the way: create two variable: 1-package scope, datatype object, name it as SourceTablesList 2-package scope, datatype string, name it as SourceTableName ( set a default value to one of source table names here ) then create a data flow task, and in the data flow task you should read from data source ( if flat file, use flat file source, if excel then use excel source ), then use a RecordSet Destination , and put the SourceTablesList variable there, then map columns. go back to control flow, add a foreach loop container, set enumerator as ado enumerator, and set source variable as SourceTablesList then go to variable mappings tab, set variable name as SourceTableName and set index as 0. then add another data flow task inside foreach loop container, inside foreach loop , add an oledb source, set access mode as "table or view name from variable" and set SourceTableName variable there. then set destination as you want to destination table. That's all. http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2011 3:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics