BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pallis
Fluorite | Level 6

HI All,

  I have a column which consists of numeric's and some numeric+char mixed.

  I'm sorry.I'm  looking only for numbers which are available in that column

ex

12345678

ab2345678d

45678ed34

34567289

looking for output:

12345678

34567289

I looking to get only numeric characters in that column. Can you help me

sas.9.2(base)

Regards,

venky

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

Did you edit your post?

The conversation will make more sense if you post clarifications separately...

So, you might want to look to use the anyalpha() function instead.

Data never sleeps

View solution in original post

4 REPLIES 4
LinusH
Tourmaline | Level 20

Maybe there is cleaner way, but this quite straightforward:

numvar=input(compress(upcase(charvar),'ABC......XYZ'),best.);

Data never sleeps
LinusH
Tourmaline | Level 20

Did you edit your post?

The conversation will make more sense if you post clarifications separately...

So, you might want to look to use the anyalpha() function instead.

Data never sleeps
pallis
Fluorite | Level 6

HI All,

  I have a column which consists of numeric's and some numeric+char mixed.

  I'm sorry.I'm  looking only for numbers which are available in that column

ex

12345678

ab2345678d

45678ed34

34567289

looking for output:

12345678

34567289

I looking to get only numeric characters in that column. Can you help me in the function.

I'm sorry i edited it.

sas.9.2(base)

Regards,

venky

pallis
Fluorite | Level 6

Thank you issue is resolved.

Regards

vnky

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1204 views
  • 0 likes
  • 2 in conversation