SSIS:动态查找查询 [英] SSIS: Dynamic Lookup Query
问题描述
我想对我的Lookup查询实现以下逻辑作为表达式:
I would like to implement the following logic to my Lookup query as an expression:
SELECT ID,
CASE @[User::ConnectionStringID]
WHEN 1 THEN "NE"
WHEN 2 THEN "BALT"
WHEN 3 THEN "NY"
WHEN 4 THEN "PA"
END AS Region
FROM dbo.Table;
我的程序包在一个循环中执行,在该循环中,使用配置文件动态更新了连接字符串,并且循环了4次,如上述逻辑所示.
My package is executed in a loop where the connection string is dynamically updated using a config file and it loops 4 times as shown in the above logic.
我今天意识到,Lookup转换没有可用的表达式,而且我无法找到其他合适的解决方案.有没有人找到解决方法或自定义转换脚本的方法?
I realized today that the Lookup transformation has no expressions available to it and I haven't been able to find another suitable solution. Has anyone found a way around this or a custom transformation script?
推荐答案
查找控件具有表达式,但是无法直接从其访问,只需转到您的Dataflowtask
属性并访问如下图所示的表达式
Lookup control has expressions, but cannot accessed directly from it just go to your Dataflowtask
properties and access the expressions like shown in the image below
这篇关于SSIS:动态查找查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!