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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
gautik92
Specialist III
Specialist III

Remove characters

I have a field containing records lik this

ID                              

10000-ABC                 

ABC123

123NBA

I want to remove all alphabets and show olny nos

Expected Output

ID                              

10000              

123

123

13 Replies
gautik92
Specialist III
Specialist III
Author

I want only 234

MK_QSL
MVP
MVP

It would be better, if you provide few more sample ID along with expected output.

10000-ABC     10000               

ABC123            123

123NBA             123

123-abc123       123

234-DEF-222   234

ABC-10000        ?

234DEF222       ?

DEF234-222     ?

Provide whatever different criteria of ID you are having.

Or, provide us the proper logic to work..

varshavig12
Specialist
Specialist

Is this okay ?

Anonymous
Not applicable

Hi,


Use below script to archive desired result.


Table1:

LOAD * INLINE [

    ID

    10000-ABC

    ABC123

    123NBA

    ];

   

Table2:

Load

PurgeChar(ID,'ABCDEFGHIJKLMNOPQRSTUVWXYX-') as NEWID

Resident Table1;

Drop Table Table1;

Warm regards,

Venkata Sreekanth