Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
adnan_rafiq
Partner - Creator II
Partner - Creator II

Special Characters Restriction

Hi Experts,

I have a situation in which I have a column with descriptions, the problem is that if any of the special characters (that is any character other than 0 to 9, a to z , A to Z) are contained in it. I want to mark it.

The problem is tried looping through each value character by character , it becomes too much time taking.  I have about 20K values.


DescriptionI want mark
HelloOK
Hello)hiBad
ByeOK
Bye'sBad



All suggestion and help much appreciated , Especially from

stalwar1

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Haha, There is no such escape sequence in qlikview. But, Work around this?

LOAD  Replace(Description, '%', Chr(39)) as Desciption,

If(SubStringCount(KeepChar(Description,'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%'),Description), 'OK', 'Bad') as [I want Mark];

LOAD Replace(Description, Chr(39), '%') as Description Inline [

Description

Hello

Hello)hi

Bye

Bye's

];

Note - If you ask in your data has  % as well. Then i suggest you to done where different character like Circle or Square ....

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
Anil_Babu_Samineni

May be this? If you have counted the different strings that may useful to use with PurgeChar()

LOAD Description, If(SubStringCount(KeepChar(Description,'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'),Description), 'OK', 'Bad') as [I want Mark] Inline [

Description

Hello

Hello)hi

Bye

Bye's

];

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
adnan_rafiq
Partner - Creator II
Partner - Creator II
Author

This seem fine, now a small complication what if I want to OK to some description that has single quote (')?

Muthu
Partner - Creator III
Partner - Creator III

Hi,

Please find the attached qvw. Hope this helps

Anil_Babu_Samineni

Haha, There is no such escape sequence in qlikview. But, Work around this?

LOAD  Replace(Description, '%', Chr(39)) as Desciption,

If(SubStringCount(KeepChar(Description,'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%'),Description), 'OK', 'Bad') as [I want Mark];

LOAD Replace(Description, Chr(39), '%') as Description Inline [

Description

Hello

Hello)hi

Bye

Bye's

];

Note - If you ask in your data has  % as well. Then i suggest you to done where different character like Circle or Square ....

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful