Assign value to variables

  • Hi there

    BOL says "SQL Server 2005 Integration Services (SSIS), expressions can be used to define conditions for CASE statements, create and update values in data columns, assign values to variables, update or populate properties at run time, define constraints in precedence constraints, and provide the expressions...."

    But do you assign Assign value to variable in expressions? Or is there any place else other than the Property Expression editor where you can assign a value to a variable?

    Thanks!

  • There are several ways to get values into variables within SSIS. You can populate variables with return values from SPs, full ADO datasets, Filenames from a for-each-file operation, expression builder, script task, etc.

    What is it specifically that you are trying to do?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • By the way, here's a good read on the subject:

    http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/64014/

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • I think the question is: is there a way to populate a User::variable from an expression, eg. SET [User::variablename]='value' so that any subsequent expressions or SSIS tasks can read this value. That is, without using an independant script task to achieve this using VB.

    A real world example: a single Send Mail notification task with multiple inbound Failure Precedents that knows the name of any given previous task because that previous task populated a User::variablename with it's own Task name. So the Send Mail subject line can be dynamically populated with the Task that failed.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply