locked
SSIS thinks an invalid expression is valid RRS feed

  • Question

  • I have put the following invalid expression:

    @[Metadata::ValidStream == TRUE

    (note the lack of a closing square bracket) into a precedence constraint, clicked the "Test" button and got the message "Expression validated successfully".

    Can anyone replicate this?

    -Jamie

    Wednesday, October 5, 2005 10:27 AM

All replies

  • Maybe an IDW16 issue. On IDW15 (all I have to hand) it fails as I would expect-

    Attempt to parse the expression "@[User::FF" failed.  The token "@" at line number "0", character number "0" was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified.

    This is an Int32 variable, being assigned to an Int32 property.

    Wednesday, October 5, 2005 11:17 AM
  • Have you tried putting it into a precedence constraint?

    P.S. I missed the rest of the expression off in the original post. I've added it now
    Wednesday, October 5, 2005 11:52 AM
  • Tried it on a constrant with the same result, or rather the same error message. Makes sense as the same expression validator engine will be used.

    BTW you can use either "[@User::Var]" or "[@User::Var] == true", as both will return a bool result. Of course the data type needs to be bool as well, but that is the same for either.
    Wednesday, October 5, 2005 12:06 PM
  • Well its a bug in IDW16 then cos ....hang on...ITS THROWING THE ERROR NOW exactly as you'd expect!

    I swear on my mother's life when I did that an hour ago it was saying the expression was valid. God this thing annoys me sometimes :)   (Remember the variable properties window issue?)

    cheers Darren.

    -Jamie
    Wednesday, October 5, 2005 12:39 PM
  • I was unable to repro this in any form I tried.
    Wednesday, October 5, 2005 3:08 PM
  • I'm also unable to reproduce this.  Sometimes I hate being crazy ;)
    Wednesday, October 5, 2005 11:41 PM