How to write an ssis expression to get the value "test"

  • hi,

    I am having difficulty writing expression to get the value from a string .

    example:

    E:\Temp\ATT_Hierarchy\Test_COR.xlsb

    Need the value "Test" from above string in ssis expression.

  • komal145 (8/19/2016)


    hi,

    I am having difficulty writing expression to get the value from a string .

    example:

    E:\Temp\ATT_Hierarchy\Test_COR.xlsb

    Need the value "Test" from above string in ssis expression.

    I created a string parameter called Val containing your example string.

    The following expression extracts 'Test' from it:

    Token(TOKEN( @[$Package::Val] , "\\",TOKENCOUNT( @[$Package::Val] , "\\")),"_",1)

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Thanks Phil for replying. It works.

  • komal145 (8/22/2016)


    Thanks Phil for replying. It works.

    Cool, no problem.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

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

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