I pass a parameter into the Execute SQL Task tool in Visual Studio 2008 and i need to execute the follow:
DECLARE CurrentFileName VARCHAR(200) := (?);
DECLARE TableToTruncate VARCHAR(200);
TableToTruncate := CurrentFileName+'_TABLE_VAR';
BEGIN
TRUNCATE TABLE TableToTruncate;
END;
Anyone have any idea why i keep getting
error ^ found "DECLARE" (at char 1) expecting a keyword".