如何在 SSIS 中根据 table 信息操作数据库
How to manipulate data base on table information in SSIS
SSIS很新,有两个table一个是BaseTable另一个是ConditionTable,基础table记录将根据条件table信息更新。
基地table
条件table
Base table 具有所需数据
在 SSIS 中可以吗?
如果在将值插入基础 table 和条件 table 后使用 Execute SQL Task
,则可以使用更新语句
update [dbo].[base]
set producttypename = b.value,
statuscode = c.value
FROM [dbo].[base] a
left join [dbo].[condition] b on a.Producttype = b.[key] and
b.sourcefield = 'producttype'
left join [dbo].[condition] c on a.statustype = c.[key] and
c.sourcefield = 'statustype'
结果
SSIS很新,有两个table一个是BaseTable另一个是ConditionTable,基础table记录将根据条件table信息更新。
基地table
条件table
Base table 具有所需数据
在 SSIS 中可以吗?
如果在将值插入基础 table 和条件 table 后使用 Execute SQL Task
,则可以使用更新语句
update [dbo].[base]
set producttypename = b.value,
statuscode = c.value
FROM [dbo].[base] a
left join [dbo].[condition] b on a.Producttype = b.[key] and
b.sourcefield = 'producttype'
left join [dbo].[condition] c on a.statustype = c.[key] and
c.sourcefield = 'statustype'
结果