Removing leading varchar
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
- Mark as New
- Subscribe to RSS Feed
- Permalink
Team,
I have a member key that has various alpha characters at the beginning, e.g. GRT3455M34355. The length varies so the right & left is not working for me. Thus, my main goal is to take that GRT from the beginning & have just the 3455M34355. Or just remove the first 3 characters of each Member key.
Thoughts?
I appreciate your help.
Solved! Go to Solution.
- Mark as New
- Subscribe to RSS Feed
- Permalink
@Andy_Katona I'm personally a fan of RegEx, but you could solve this one a couple different ways. The RegEx you could use for this is pretty simple based on your example, and you could refine it if the data has more nuances.
RegEx Parse: .{3}(.+)
Another approach would be along the lines of the Left/Right functions you mentioned. You want everything to the right of the first 3 characters, but you don't know how many that will be. Use a Length function to let the workflow calculate that number, and take all but the Left 3 characters.
Formula: Right([Sample],Length([Sample])-3)
See attached for an example that shows both of these. Hope this helps!
- Mark as New
- Subscribe to RSS Feed
- Permalink
how about:
substring([field],3,)
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Subscribe to RSS Feed
- Permalink
Substring([Field],3)
That is the proper syntax to take the 3rd position forward. the numbering is zero-based.
ABCDEFG will become
DEFG
Cheers again,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Subscribe to RSS Feed
- Permalink
Team,
I can't thank you enough. I searched the web & played with RegEx for hours trying to figure it out. Thank you!!!! I can't wait till I get better at this so I can help others as well.
