Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
bruce_sorge
Contributor III
Contributor III

Remove repeated characters and extra names

Hello all,

 

I have a field in my DB that looks like this:

Field name is PRI_PI:

Elimelech, Menachem~0,2002,2003,F|Harvey, Ronald W.~0,2002,2003,F

In my load script, I can remove the tilde and numbers like this:

PurgeChar(PRI_PI,'1234567890~-') as PrimaryPI,

I then have this:

Elimelech, Menachem,,,F|Harvey, Ronald W.,,F

What I would like to to is to transform this to:

Elimelech, Menachem | Harvey, Ronald W

 

Then, when I display the list, each researcher is on their own row:

Elimelech, Menachem

Harvey, Ronald W

 

How could I accomplish this? 

 

Thanks

 

Labels (1)
1 Solution

Accepted Solutions
HirisH_V7
Master
Master

Hi you can use this below,

Purgechar(Subfield(SubField(Field,'|'),'~',1),'.') as Field_Formed.

HirisH_V7_0-1588347915949.png

 

HirisH
“Aspire to Inspire before we Expire!”

View solution in original post

3 Replies
HirisH_V7
Master
Master

Hi you can use this below,

Purgechar(Subfield(SubField(Field,'|'),'~',1),'.') as Field_Formed.

HirisH_V7_0-1588347915949.png

 

HirisH
“Aspire to Inspire before we Expire!”
Vegar
MVP
MVP

Try this is expression:

LOAD 

Subfield( Subfield (PRI_PI,'|'), '~', 1) as Researcher

From data;

bruce_sorge
Contributor III
Contributor III
Author

That worked, thanks