SSIS Expression Builder - How to find last occurrence of a character

ぐ巨炮叔叔 提交于 2019-12-12 20:16:25

问题


I have values that look like this:

D:\DM-250\Insert_Jobs-QA-UAT\14-FILE_A_UpdateInsert.dts

D:\DM-250\Insert_Jobs-QA-UAT\Something_DaisyChain\14-stuff_and_things_UpdateInsert.dts

D:\DM-250\14-another_file.dts

I want the very ends of these 3 values, starting from the last "\" character.

I tried to use FINDSTRING, but I don't know how to grab the last occurrence of a character.

Any suggestions?


回答1:


This will give you the position from the right.

findstring(reverse([your column]),"\",1)

I am guessing you are trying to extract filename which is:

right([your column], [result from above] - 1)


来源:https://stackoverflow.com/questions/52821865/ssis-expression-builder-how-to-find-last-occurrence-of-a-character

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!