【问题标题】:SSIS ExpressionSSIS 表达式
【发布时间】:2016-02-02 22:03:22
【问题描述】:
 SELECT CAST(Count(1) as VARCHAR(30)) AS SourceRowCount 
 FROM table 
 where countryid= '" +@[User::Id] +"'"+ " "+"
 AND locationid ="'+@[User::ID1]+'"

预期输出

 SELECT CAST(Count(1) as VARCHAR(30)) AS SourceRowCount 
 FROM table 
 where countryid= 1 
 AND locationid =2

【问题讨论】:

  • 我编辑了您的问题以格式化您的代码。现在你的实际问题是什么?
  • 没有问过问题
  • 嗨,我尝试了下面的表达式并得到了错误。请帮我 SELECT CAST(Count(1) as VARCHAR(30)) AS SourceRowCount FROM table where countryid= '" +@[User::Id] +"'"+ " "+" AND locationid ="'+@[用户::ID1]+'"

标签: ssis ssis-2012 ssis-2008


【解决方案1】:

在控制流中使用执行 SQL 任务步骤来执行查询,将两个变量值作为参数传入,并将值返回到另一个变量 https://www.simple-talk.com/sql/ssis/ssis-basics-using-the-execute-sql-task-to-generate-result-sets/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-27
    • 2016-10-14
    • 1970-01-01
    相关资源
    最近更新 更多