我已经在包级别声明了一个变量,并通过在包的控制流中 compdate
删除一个变量来测试数据流。Execute SQL Task
在任务中,
SQL 语句:select ? = (getdate() - 1)
参数映射:
- 变量的名称:
User::compdate
- 方向:
Output
- 数据类型:
DATE
- 参数名称:
0
- 参数大小:
-1
.
为什么我收到错误:
[Execute SQL Task] Error: Executing the query "declare @compdate date
set @compdate = (getdate() ..." failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.