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

Announcements
Join us in Toronto Sept 9th 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.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

I am assuming that all the values have a 5 digit numerical value preceeding a name. You can use Mid function as follows:

Load * Inline [

Name

32456 Mr Adam Jones
32247 Mr Brown Smith
] ;

Then use the following function and add it as a calculated dimension:

Mid(Name,7)

Also, you can use the 3rd parameter in Mid() function, if you need to specify the length of the string to be returned.

Hope this helps!

View solution in original post

21 Replies
Not applicable
Author

Hi,

I am assuming that all the values have a 5 digit numerical value preceeding a name. You can use Mid function as follows:

Load * Inline [

Name

32456 Mr Adam Jones
32247 Mr Brown Smith
] ;

Then use the following function and add it as a calculated dimension:

Mid(Name,7)

Also, you can use the 3rd parameter in Mid() function, if you need to specify the length of the string to be returned.

Hope this helps!

jagan
Partner - Champion III
Partner - Champion III


Hi,

Use this

=PurgeChar(Name, '1234567890')

Regards,

Jagan.

Not applicable
Author

In the script try

mid(Name,(1+Index(Name,' '))) as Name

Not applicable
Author

Purgechar('32456 Mr Adam Jones' , '0123456789')

The opposite is keepchar.

amars
Specialist
Specialist

Hi Amelia,

Use Either of

PurgeChar(Name, '1234567890')

or

KeepChar(Name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz').

You can use it in either script or expressions. Better to use it in script and create a field with all texts.

Thanks..


tresesco
MVP
MVP

Use PurgeChar() like:

=PurgeChar(NameField, '0123456789')

AbhijitBansode
Specialist
Specialist

Use PurgeChar function

PurgeChar (Name,''0123456789)

Not applicable
Author

I have provided two ways to get rid of the number. Please see attached

israrkhan
Specialist II
Specialist II

Hi,

if you know that numbers are fix length like above 32456 (five digit).

than you can use Right function in script.