SSIS Equivalent?

  • If I wanted to derive the file name from a path in T-SQL, I would use the following:

    LTRIM(RTRIM(REVERSE(SUBSTRING(REVERSE(b.filename),0,CHARINDEX('\', REVERSE(b.filename), 0)))))

    However, I don't think there is a CHARINDEX function in SSIS. So what would be the SSIS equivalent to get the job done?

  • Refer to find a list of various SSIS functions

    http://technet.microsoft.com/en-us/library/ms141671.aspx

    in particular - FINDSTRING

    http://technet.microsoft.com/en-us/library/ms141748.aspx

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Thanks to you, I think I'm gaining an understanding of Findstring, except for one thing: how do figure out the LAST occurrence of the "\" character within the string?

  • Reverse the string, find the first occurrence in the reversed string and then subtract that from the total string length ...

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin

    Reverse the string, find the first occurrence in the reversed string and then subtract that from the total string length

    And here is a link that explains the REVERSE function

    http://technet.microsoft.com/en-us/library/ms141049.aspx

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

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

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