SSIS Expression Builder-如何查找字符的最后一次出现 [英] SSIS Expression Builder - How to find last occurrence of a character

查看:113
本文介绍了SSIS Expression Builder-如何查找字符的最后一次出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的值看起来像这样:

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

我希望这3个值的结尾,从最后一个"\"字符开始.

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

我尝试使用FINDSTRING,但是我不知道如何获取字符的最后一次出现.

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

有什么建议吗?

推荐答案

这将为您提供从右侧开始的位置.

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)

这篇关于SSIS Expression Builder-如何查找字符的最后一次出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆