Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Cincinnati, OH

SOLVED

Removing leading varchar

Andy_Katona
8 - Asteroid

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.  

4 REPLIES 4
Peter1
5 - Atom

@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!

MarqueeCrew
20 - Arcturus
20 - Arcturus

how about:

 

substring([field],3,)

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MarqueeCrew
20 - Arcturus
20 - Arcturus
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

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Andy_Katona
8 - Asteroid

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.