この声明を実行するのに苦労しています
SET @SelectStatement = 'INSERT INTO [ArchiveProcessHistory] VALUES (' + @TableName + ',' + @TotalRowsSource +',' + @TotalRowsDestination + ',' + GetDate()') '
[上記のステートメントに何か問題があることは知っていますが、修正することはできません)
SET @FullStatement = @SelectStatement
ArchiveProcessHistory テーブルの構造は次のとおりです。
TableName - nvarch(5)
TotalRowsSource - integer
TotalRowsDestination - integer
DateofInsert - Date
sp_executesql を実行すると、このエラーが発生します
メッセージ 102、レベル 15、状態 1、手順 usp_ArchiveTable、行 39 ')' 付近の構文が正しくありません。
どうすればこれを解決できますか?