[英]How to insert data from multiple tables to single table in SSIS?
Below are my three source tables. 以下是我的三个源表。
Example Values: Record #1: 1, Road Accident Record #2: 2, Safety Criteria 示例值:记录#1:1,道路事故记录#2:2,安全标准
Example Values: Record #1: 1, 2019-01-31 00:00:00.000 Record #1: 2, 2019-02-28 00:00:00.000 示例值:记录#1:1,2019-01-31 00:00:00.000记录#1:2,2019-02-28 00:00:00.000
3. GENERATED SQL STATEMENT This one has sql statement with aggregated rows. 3.生成的SQL语句这个具有聚合行的sql语句。
Hence, Above three are sources to read record and below one is where I am trying to write data. 因此,以上三个是读取记录的来源,一个是我试图写入数据的地方。
NOTE : Last 4 columns in above table are derived from SQL statement from point #3. 注意 :上表中的最后4列是从#3点的SQL语句派生的。
So far I have tried below using SSIS with no avail. 到目前为止,我在下面尝试使用SSIS无济于事。
Honestly, I cannot really share any code but an attached image above as I am intending to use SSIS. 老实说,我不能真正共享任何代码,而是上面附带的图像,因为我打算使用SSIS。
As an expected result, I am intending to see output like below. 作为预期的结果,我打算看到如下的输出。
Some good insight from community is appreciated. 来自社区的一些好的见解表示赞赏。
MORE DESCRIPTION: In above point #3 3. GENERATED SQL STATEMENT , I am deriving a query which belongs to completely separate database and it has no reference to above master tables. 更多描述:在上面的点#3 3.生成SQL语句 ,我派生的查询属于完全独立的数据库,并且它没有对上述主表的引用。 And tables in first two points belong to separate database.
前两点的表属于单独的数据库。 Hence, I am not sure how lookup would help.
因此,我不确定查找是如何帮助的。
您可以使用三点对象名称(即DB.Schema.Table)并在单个查询中引用多个数据库中的对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.