Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get only character data from complete name


Hi,

I have one column values in sql table as

Name= 32456 Mr Adam Jones

I need to get Name= Mr Adam Jones in Straight table. Could anyone help me how to write expression or script to get obly name part.

Thanks.

21 Replies
Not applicable
Author

Please can anyone help me

Not applicable
Author

Hi

Use PurgeChar, as below;

Load

     PurgeChar(Name, '0123456789') as Name

Resident Name;

Let me know how you get on.

Regards

Steve

m_woolf
Master II
Master II

Look in help for Purgechar()

Not applicable
Author

Hi Amelia,

Please find attachment.

Hope this will help.

Regards,

Adeel

Kushal_Chawda

try:

mid('32456 Mr Adam Jones',index('32456 Mr Adam Jones',' ',1),index('32456 Mr Adam Jones',' ',-1))

qlikpahadi07
Specialist
Specialist

=purgechar ('32456 Mr Adam Jones','1234567890')

sushil353
Master II
Master II

Hi,

Use purgechar ()

purgechar ( 'a1b2c3','123' ) returns 'abc'

HTH

Sushil

Andrea_Ghirardello

You can achieve your needs in several ways:

1. using KeepChar or PurgeChar functions.

e.g.   trim(purgechar ( Name,'0123456789' )) returns 'Mr Adam Jones'

2. if the prefix has a fixed lenght you can use the right function

e.g. right(name,len(name)-6) returns 'Mr Adam Jones'

Anonymous
Not applicable
Author

Amelia:

i think the simplest way to achieve it is :

Trim(PurgeChar(Name,'0123456789'))

where Name is a Fieldname or Variable

Regards

Not applicable
Author

Hi

You can use Purgechar function

Purgechar('apple123','123') will return 'apple'