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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Purgechar function

     Hi everybody,

i have an issue, i got a field, and i want to delete de character "

So i found the purgechar function, and i use it like that:

purgechar(NF4_Fournisseurs_QVD.N°,' " ') as  NF4_Fournisseurs_QVD.N°,


I don't have an error, but nothing change, the character is still present.


Anyone can help me?


Thanks a lot !!

9 Replies
Colin-Albert
Partner - Champion
Partner - Champion

Try purging the ascii code value instead.  34 is the ascii code for "

purgechar(NF4_Fournisseurs_QVD.N°, chr(34) ) as  NF4_Fournisseurs_QVD.N°

PrashantSangle

Hi,

Use Chr(34) instead of "

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

This works fine for me :

     =purgechar('qwe"rty' , '"' )

I suspect you have unwanted spaces in your string.

its_anandrjs
Champion III
Champion III

Hi,

Which character  you want to Purge.

Regards,

Anand

its_anandrjs
Champion III
Champion III

By Purgerchar it is working check this and if it is ( " ).

LOAD purgechar(Str,' " ') as  NF4_Fournisseurs_QVD.N°,Str;

LOAD * Inline

[

Str

Teststring "TesttestStr

];

Not applicable
Author

PurgeChar(s1, s2)

Returns the string s1 less all characters contained in string s2.

Example:

purgechar ( 'q1li2kview3','123' ) returns 'qlikview'

MK_QSL
MVP
MVP

use

TRIM(NF4_Fournisseurs_QVD.N°) as NF4_Fournisseurs_QVD.N°

Not applicable
Author

Hi thanks a lot everybody but that's not good, and i try every technics..

purgechar(trim(NF4_Client_QVD.N°),chr(34)) as NF4_Client_QVD.N°,

OR

trim(NF4_Client_QVD.N°),chr(34)) as NF4_Client_QVD.N°,

OR with (") instead of chr(34) ...

Colin-Albert
Partner - Champion
Partner - Champion

Are you sure the character is a double quote (ascii 34) and not two single quotes (ascii 39)? Try replacing chr(39).

Otherwise you could use keepchar() and list the characters that you wish to keep, any other characters are removed.