Kirix Support Forums

remove alphas from string

Please post any help questions, requests or other feedback here.

remove alphas from string

Postby abenitez77 on Mon Aug 06, 2012 10:50 am

How do I remove the alpha characters from a string in a calculated field? I only want the numeric values.
abenitez77
Registered User
 
Posts: 143
Joined: Fri Jan 21, 2011 12:42 pm

Re: remove alphas from string

Postby Ken on Thu Aug 09, 2012 1:30 pm

I'd suggest using the TRANSLATE() function like:

TRANSLATE(fieldname,"A","")
Ken Kaczmarek
Kirix Support Team
User avatar
Ken
Kirix Support Team
 
Posts: 147
Joined: Mon Dec 19, 2005 10:36 am

Re: remove alphas from string

Postby abenitez77 on Thu Aug 09, 2012 4:06 pm

This works fine if I know the letters that I want to remove...but is there a way to select a range? i.e. [A-Z]
abenitez77
Registered User
 
Posts: 143
Joined: Fri Jan 21, 2011 12:42 pm

Re: remove alphas from string

Postby Ken on Fri Aug 10, 2012 9:52 am

You'd need to select them all:

TRANSLATE(fieldname,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","")
Ken Kaczmarek
Kirix Support Team
User avatar
Ken
Kirix Support Team
 
Posts: 147
Joined: Mon Dec 19, 2005 10:36 am

Return to Strata Help & Feedback