I'm using a SSIS script task to dynamically import and create staging tables on the fly from csvs as there are so many (30+.)
For example, a table in SQL server will be created called 'Customer_03122018_1305' based on the name of the csv file. How do I then insert into the actual 'real' 'Customer' table?
Please note -there are other tables - e.g. 'OrderHead_03122018_1310' that will need to go into a 'OrderHead' table. Likewise for 'OrderLines_03122018_1405' etc.
I know how to perform the SQL insert, but the staging tables will be constantly changing based on csv date timestamp. I'm guessing this will be a script task?
I'm think of using a control table when I originally import the csv's and then lookup the real table name?
Any help would be appreciated.
Thanks.
答案 0 :(得分:0)
您可以按照以下过程,通过使用如下所述的FOR循环将所有临时表动态加载到主客户表中,