问题描述:

 SELECT CAST(Count(1) as VARCHAR(30)) AS SourceRowCount

FROM table

where countryid= '" [email protected][User::Id] +"'"+ " "+"

AND locationid ="'[email protected][User::ID1]+'"

Expected output

 SELECT CAST(Count(1) as VARCHAR(30)) AS SourceRowCount

FROM table

where countryid= 1

AND locationid =2

网友答案:

Use an Execute SQL Task step in your Control Flow to execute the query, passing the two variable values in as parameters, and return the value into another variable, https://www.simple-talk.com/sql/ssis/ssis-basics-using-the-execute-sql-task-to-generate-result-sets/ .

相关阅读:
Top