Geeks With Blogs

Arthur Zubarev Compudicted

It will be a super short and looks like the first and last post in January 2011.

So back to the topic, I decided to share an SSIS expression I crafted to extract the value concealed between two characters (I needed to get a portion of text in a file path):

Substring(@[User::MyString],FINDSTRING(@[User::MyString],"(",1)+1,FINDSTRING(@[User::MyString],")",1) - FINDSTRING(@[User::MyString],"(",1)-1)

The value of MyString say could be c:\test\test(testing123456789).txt, then the resulting text captured testing123456789.

Hopefully it will be needed to somebody.

Posted on Monday, January 31, 2011 12:14 PM | Back to top


Comments on this post: SSIS Expression to Find Text Between Characters

# re: SSIS Expression to Find Text Between Characters
Requesting Gravatar...
How could you then go about replacing that selected text?
Left by FloridaGirl1218 on May 22, 2012 8:05 AM

# re: SSIS Expression to Find Text Between Characters
Requesting Gravatar...
Thanks, this is very helpful.
Left by Tom H on Jul 20, 2012 5:06 PM

# re: SSIS Expression to Find Text Between Characters
Requesting Gravatar...
Hi,
I am also searching for this expression.
Thank you so much for your post.
Left by pratap reddy on Jun 29, 2014 5:22 PM

Your comment:
 (will show your gravatar)


Copyright © Compudicted | Powered by: GeeksWithBlogs.net | Join free