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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove symbols

I have table with multiple fields and from on field named Names i want to remove the symbol |

KEY,Names
1,Alan | Bros
2,Peter | Kobal
3,James | Kris
4,Martin | Ross
5,Kristien | Grenn

Jay

Labels (1)
1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

Then try this ways

Source:

LOAD *,SubField(Names,'|',1) as FirstName,

SubField(Names,'|',2) as LastName;

LOAD SubField(Names,'|') as New,KEY,    Names;

LOAD * Inline

[

KEY,    Names

1,    Alan | Bros

2,    Peter | Kobal

3,    James | Kris

4,    Martin | Ross

5,    Kristien | Grenn

];

Regards

Anand

View solution in original post

10 Replies
Anonymous
Not applicable
Author

=purgechar ( 'Alan | Bros' , '|' )

saumyashah90
Specialist
Specialist

Use

=Subfield(Names,'|',1)& ' ' &Subfield(Names,'|',2)

Not applicable
Author

Use the replace function.

An example: replace('abccde','cc','xyz') returns 'abxyzde'

In your case = Replace(Names,'|',' ')

Hope it helps!

Br,

T

its_anandrjs
Champion III
Champion III

Hi,

Try to load your table like this way

Source:

LOAD SubField(Names,'|') as New, KEY,   Names;

LOAD * Inline

[

KEY,    Names

1,    Alan | Bros

2,    Peter | Kobal

3,    James | Kris

4,    Martin | Ross

5,    Kristien | Grenn

];

Regards

Anand

saumyashah90
Specialist
Specialist

=purgechar(Names,'|')

jpenuliar
Partner - Specialist III
Partner - Specialist III

You can use purgeChar().

ex: PurgeChar(Names,'|')

saumyashah90
Specialist
Specialist

Check this file

Not applicable
Author

And how can i create the two fields in the load script from the same.

its_anandrjs
Champion III
Champion III

Hi,

Then try this ways

Source:

LOAD *,SubField(Names,'|',1) as FirstName,

SubField(Names,'|',2) as LastName;

LOAD SubField(Names,'|') as New,KEY,    Names;

LOAD * Inline

[

KEY,    Names

1,    Alan | Bros

2,    Peter | Kobal

3,    James | Kris

4,    Martin | Ross

5,    Kristien | Grenn

];

Regards

Anand