パッケージ レベルで変数を宣言し、パッケージの制御フローに を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.