Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to standardise a text string which currently has a combination of data - some with numbers only and some with numbers and values - and I want to remove any text from text strings so that only values are shown.
For example, the field contains ABC1234, DEF1234 and 5678. The first two should be displayed as 1234 only, and the last one should still show 5678.
I'd tried using Replace([Job No], 'ABC' , '' ) but I couldn't remove all the different text variants. Is it possible to use a nested replace function (or similar)? Tried a few different approaches but struggled to fix it!
Thanks!
Hi, thanks for the reply. I've tried tweaking your suggestion and either of the below seem to work ok for me...!
purgechar([field],'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z')
keepchar([field],'0,1,2,3,4,5,6,7,8,9')
KeepChar([Field Name],0123456789) as [Value Is Numeric]
Hi, thanks for the reply. I've tried tweaking your suggestion and either of the below seem to work ok for me...!
purgechar([field],'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z')
keepchar([field],'0,1,2,3,4,5,6,7,8,9')