locked
assign variable in expression RRS feed

  • Question

  • Hello,
    I have a user variable as string. @[User::vTaskName]
    There is no default value for this variable. I would like to set a string to this variable on failure precedence as expression and constraint. In th eexpression when I do something like : @[User::vTaskName] = "test" I get an error which says: can not convert expression value to property type. additional information: can not convert system.string to system.BooleanDo you know how I can assign a test to this variable in expression? Thank you

    Tuesday, October 10, 2017 7:48 AM

Answers

All replies

  • Hi, you should use the Expression Task to set a value to your variable: http://www.excoded.com/learn/ssis/ssis_expressiontask.php

    Jorg Klein's Microsoft Business Intelligence Blog

    • Marked as answer by arkiboys Tuesday, October 10, 2017 8:24 AM
    Tuesday, October 10, 2017 8:07 AM
  • Did you defined the variable as string type or are you assign any Boolean values to the string?

    The error basically not able to convert from string/int to Boolean.

    Regards,

    Eshwar.


    Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.

    Tuesday, October 10, 2017 8:14 AM
  • Hi arkiboys,

    You could use the Expression Task to set the value of the variable, with precedence constraint of failure.


    Ousama EL HOR, MCSE|MCSA|MCP. Please mark as answered, If you feel happy with this answer.

    Tuesday, October 10, 2017 8:16 AM
  • Hi, you should use the Expression Task to set a value to your variable: http://www.excoded.com/learn/ssis/ssis_expressiontask.php

    Jorg Klein's Microsoft Business Intelligence Blog


    Thank you
    Tuesday, October 10, 2017 8:24 AM