Stripping a String

Chakra shared this question 1 year ago
Answered

Hello experts,

I'm looking to strip down a string based on position of character and display it as a column.

For Example:

Owner Name Field (Company Name\UserLogInName)

ABCD\TOM

ABCD\POP

EFGH12\Jerry

KL56HP\Pluto

Now I'd like to only display everything after '\'. Result should be

TOM

POP

Jerry

Pluto

I looked at CHARINDEX/POSITION option and was able to create a column which gives me position of '\' for each record. I was trying to use position in substring but it doesn't seem to allow me to do that.

Looking for something like below:

=(Substr(Ownername];Pos([Ownername];"\")+1;Length([Ownername])))

Appreciate your assistance please.

Thank you,

CT

Comments (2)

photo
1

Hi Chakra,

Your best bet would be some sort of free-hand SQL statement where you can select to only display values that appear after a certain character. Some seemingly good information on how you can accomplish this can be found here.

Hope this helps.

Regards,

Mike

photo
1

Hi Chakra,

I'm just going through some of my older cases. I'm going to go ahead and mark this one as Answered, but if you have further questions or concerns on this, if you respond, it will re-open the case and put it back in my queue and I'll be happy to help.

Regards,

Mike