Trying to remove part of a string from text in a column
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am trying to remove a portion of text in a string in a column of data. I have tried different methods and tools and have struck out and I guess I am just missing something. I want everything after the open parentheses gone. There is no consistency in the number of characters that may before a "(" and just need everything after it removed. I have tried with the column as a V_String and as a String, though not sure if it makes a difference.
Here is an example of what I am dealing with and where i want to end up:
A file of the data is attached. Any help is greatly appreciated.
Thanks,
Kevin
- Labels:
- Expression
- Parse
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KBBear one approach to tackle this is use a Text to column tool and use ( as a delimeter to spilt the column. I mocked up an approach. You could also use Regex as another approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KBBear
Use a left function paired with a findstring function.
LEFT([Field1],FindString([Field1],'('))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@KBBear another option using sub string function and the find string function
SubString([Data],0, FindString([Data], '('))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Awesome! Two excellent solutions. Thank you guys so much! Knew there was a better mouse trap out there.
