我正试图在我的SSIS进度日志中删除一些虚假警告.我在使用原始SQL来完成工作的任务中收到一堆关于未使用列的警告.我有一个数据流负责在加载新数据之前将数据存档到临时表中.数据流如下所示:
+--------------------+
| OLEDB Source task: |
| read staging table |
+--------------------+
|
|
+---------------------------+
| OLEDB Command task: |
| upsert into history table |
+---------------------------+
|
|
+---------------------------+
| OLEDB Command task: |
| delete from staging table |
+---------------------------+
Run Code Online (Sandbox Code Playgroud)
我的'upsert'任务是这样的:
--------------------------------------
-- update existing rows first...
update history
set field1 = s.field1
...
from history h
inner join staging s
on h.id = s.id
where h.last_edit_date <> s.last_edit_date -- only update changed records
-- ... then …Run Code Online (Sandbox Code Playgroud)