ssis - 在 SSIS 中使用“Dynamics CRM Source”fetchXML 中的变量
问题描述
我正在该包中构建 SSIS 包我正在使用“Dynamics CRM Source”控件,该控件使用 fetchXML 从 MS Dynamics CRM 检索数据。
这是我的 fetchXML:
<fetch>
<entity name='f1_workorder'>
<all-attributes />
<filter type='and'>
<condition attribute='createdon' operator="on-or-after" value="5/5/2018" />
</filter>
</entity>
</fetch>
您可以看到条件值是硬编码的“5/5/2018”
它假设是从一个名为 XMLPeriod 的变量中读取的。
我尝试了很多方法来使用 fetchXML 中的变量,但没有成功。我试过这个
<condition attribute='createdon' operator="on-or-after" value=@XMLPeriod />
和这个
<condition attribute='createdon' operator="on-or-after" value="@XMLPeriod" />
和这个
<condition attribute='createdon' operator="on-or-after" value="@[User::XMLPeriod]" />
和这个
<condition attribute='createdon' operator="on-or-after" value=@[User::XMLPeriod] />
我收到这个错误
'@' is an unexpected token. The expected token is '"' or '''. Line 5, position 71.
知道如何让它工作吗?
解决方案
正如 Arun 在评论中所建议的那样,第三个选项(复制如下)应该可以工作。
<condition attribute='createdon' operator="on-or-after" value="@[User::XMLPeriod]" />
如果它不起作用,请在此处发布整个错误消息,以便我进一步查看。
推荐阅读
- python - 用 opencv 和 Matplotlib 分析螺丝
- swift - 在 '.symlinks/plugins/myapp/ios' 中找不到 'myapp' 的 podspec
- r - 如何在 RStudio 中下载 Spectre
- c# - 在 C# winform 中的 printdocument 中换行
- excel - 如何编辑此返回多个匹配的 VBA 代码以在下面输入匹配?
- sql - 改变决赛桌结构的枢轴
- json - 在 Flutter Stateful Widget 中从 json 加载数据的问题
- git - 在 Azure Devops 管道中:推送标签有效,但不能推送
- c++ - 为什么在 try-catch 中完全封闭的构造函数中抛出的异常似乎被重新抛出?
- php - Meilisearch 用户特定过滤