2
votes

I have an SSIS package* built in BIDS 2008 with a variable whose value was originally being evaluated as an Expression. We now set the value in a different way, but I can't for the life of me figure out a way to remove the (now invalid) Expression from the variable without mucking about in the XML.

I've set EvaluateAsExpression to False but I can't just delete the Expression. I'm able to select and copy and the text directly from the Properties window, but I can't edit or delete it from there. Clicking the ellipsis to open the Expression Builder screen will let me modify it, but clearing it and clicking OK gives me an 'Expression cannot be evaluated' error.

Am I being obtuse or is this yet another thing that doesn't quite work in SSIS?

* now I have two problems

3
can't you just delete it from the expression text box without entering in the expression builder?Jayvee
@Jayvee no, I've tried that. I can select and copy the text but not edit or delete it. I'll clarify that in my question.Alex
I've noticed that sometimes the behaviour in the property window is different to the variable window. Have you tried to delete it from the variable window?Jayvee
if variable is of type String then try to assign value in variable pane and then clear the expression.Vikramsinh Shinde
I'm not quite sure what you both mean by variable window - the window that lists the variables and their types doesn't have the expression in it, just name, type, scope and value (I am on BIDS 2008, will add to Q)Alex

3 Answers

3
votes

This is another one of those delightful, quirky SSIS / BIDS nuances.

  1. Select your variable from the Variables pane;
  2. Set the EvaluateAsExpression property to True in the Properties pane;
  3. Select the Expression property value in the Properties pane and clear the value;
  4. Press your TAB key a couple of times to move focus away from the Expression property value field; and
  5. Set the EvaluateAsExpression property back to False.
1
votes

If you go into the properties for the task, then Expressions, there is a Delete at the individual Property.

0
votes

To delete an expression from an SSIS Task in Expressions item in the task window

  1. Expand the expressions plus sign to reveal the various expressions
  2. Delete the contents of the blank box next to the property that previously had an expression.
  3. When you tab out the box, you will receive a warning that the assignment will be removed - OK Note: If you try this in the expressions editor it will not allow you to close with a blank expression.