Problem parsing expression

  • I'm trying to create an expression for a flat file connector connection string. I'm in SSIS 2008. here's the code:

    "G:\Operations\DATA\SSIS\AST\" +

    @[User::FileName_Prefix] +

    @[User::FileName_Region] +

    @[User::FileName_Timestamp] +

    ".txt"

    and here's the error message.

    Attempt to parse the expression

    ""G:\Operations\DATA\SSIS\AST\" &

    @[User::FileName_Prefix] &

    @[User::FileName_Region] &

    @[User::FileName_Timestamp] &

    ".txt""

    failed. The token “.” At line number 5, character 2 was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified.

    When I take out that ".txt", I get:

    Attempt to parse the expression ""G:\Operations\DATA\SSIS\AST\" +

    @[User::FileName_Prefix] +

    @[User::FileName_Region] +

    @[User::FileName_Timestamp] " 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.

    Any ideas how to work this?

  • nonghead-webspam (5/2/2014)


    I'm trying to create an expression for a flat file connector connection string. I'm in SSIS 2008. here's the code:

    "G:\Operations\DATA\SSIS\AST\" +

    @[User::FileName_Prefix] +

    @[User::FileName_Region] +

    @[User::FileName_Timestamp] +

    ".txt"

    Almost there, just missing the double (escaped) backslash

    😎

    "G:\\Operations\\DATA\\SSIS\\AST\\" +

    @[User::FileName_Prefix] +

    @[User::FileName_Region] +

    @[User::FileName_Timestamp] +

    ".txt"

  • Thank you.

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

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