• Greetings

    If you wish to pass your variable to your stored procedure simply do the following:

    1. Go to the properties on the sql task and clickon the elipses within the expression builder.

    2.select the sqlstatementsource property and build an expression.

    From here is pretty simple here is an example:

    "exec spPopStatementBase2FactLoopCln" + "'"+@[User::ZipFilePathConverted]+"'"

    what you are doing here is creating your sql statement during run time. As you can see you are passing the user vaiable to the parameter your sotred proc expects. In this example my proc expects a file path. Now since your proc is expecting a date you will need to convert your date to a string. In this example I'm not concerned about the time on the date, because I don't carry it.

    You would do someting like this:

    "exec dwscrub..SpPopCommissionFileRePost "+"'"+ (DT_WSTR, 30) (DT_DBDATE) @[User::PostDate] +"'"

    Now you can actaully evaluate your expression during design time if you put a date in the variable section and you want to make sure your expression returned, is somthing you can actually past in a sql pane and execute. That would be a good test for you.

    I hope this helps. I'm sure there are othre ways you can do this. But I just wanted to give you an example. Far as documentation goes, I would make sure you put an annotation (note) next to the tasks stating that you are using the expression builder. Simply, so the next guy that comes along and looks at your code. Or you can get some lug ins to VS to highlight tasks when there is code in the sql task. FYI-I'm a sql guy and the expression builder takes some time to get use to. " double quoutes are used around your expressions. Of course the + symbol is basically concatentation jsut like sql, but I often find myself forgetting that. Have a nice day.