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

Remove special characters and split into rows

 
 

Hi There,

I wanted to remove $ character in the below values. The $ character within the string represents different values, which should be moved into separate rows.

Table:
LOAD *
INLINE [
Key, Value
58, $London city$New York$
66, $Tokyo$New Delhi$
];

 

Output:

Key, Value
58, London city
58, New York
66, Tokyo
66, New Delhi

 

Please help

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

@surajap123  try below

 

Table:
load *
where len(trim(Value))>0;
LOAD Key,
     subfield(Value,'$') as Value
FROM table;

 

View solution in original post

4 Replies
Kushal_Chawda

@surajap123  try below

 

Table:
load *
where len(trim(Value))>0;
LOAD Key,
     subfield(Value,'$') as Value
FROM table;

 

surajap123
Creator II
Creator II
Author

I tried it, seems it didn't work.

Please help.

 

Kushal_Chawda

@surajap123  when you take  a resident load if columns are same then it will autoconcatenate with previous table so add noconcatenate before you do resident load

NoConcatenate
load *
where len(trim(Value))>0;
LOAD Key,
subfield(Value,'$') as Value
Resident Table;

DROP table Table;

surajap123
Creator II
Creator II
Author

Thank you so much @Kushal_Chawda