Re: Parameter don't work in TSQL -
04-03-2008
, 03:32 AM
Hi Francisco,
Firstly, I'm assuming you're using SSIS and not DTS2000 .. if you're
using DTS then you need to write an ActiveX script which I'm afraid I
can't help you with because I don't have a copy of SQL2k installed
anymore.
In SSIS:
1) Select the "Expressions" option in the left pane of the ExecuteSQL
task editor and click the "..." button next to Expressions on the
right pane.
2) Select the "SqlStatementSource" property, and open the Expression
Builder ("..." button again)
3) Type your SQL statement into the Expression box. Something like:
"INSERT INTO PackageSystemAudit (PackageName, ...
VALUES ('" + @[User::PackageName] + "', '" + @[User::Param2] + ...
You can evaluate the expression to check that it's generating the
expected results. This expression will generate the SQL statement at
runtime using the current package variable values.
Good luck!
J |