Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

khasimvali85
Contributor II

how to Eliminate /,.,- in particular field?

Hi Community,

how to eliminate /,-,. in the perticular field? i am used subfield and purgechar but not showing the actual output.

Example: i have field like Reason

Reason(field)

not there.

customer/not available

customer/call-rejected

rejected_calls.

my achivement is:

---------------------

Reason

not there

customernot available

customer call rejected

rejectedcalls

the above reasons i wanna eliminate /,-,_,.

when i use Subfield(Reason,'/') as Reason only eliminate '/'

and i used Purgechar also but only eliminate single '/'

How can i achive this?

1 Solution

Accepted Solutions

Re: how to Eliminate /,.,- in particular field?

t1:

load * inline

[

Reason

not there.

customer/not available

customer/call-rejected

rejected_calls

];

final:

load

replace(replace(replace(Reason,'/', ' '),'_',' '),'-',' ') as reason

Resident t1;

drop table t1

5 Replies

Re: how to Eliminate /,.,- in particular field?

t1:

load * inline

[

Reason

not there.

customer/not available

customer/call-rejected

rejected_calls

];

final:

load

replace(replace(replace(Reason,'/', ' '),'_',' '),'-',' ') as reason

Resident t1;

drop table t1

awhitfield
Esteemed Contributor

Re: how to Eliminate /,.,- in particular field?

Example Attached

bwisenosimenkg
Valued Contributor

Re: how to Eliminate /,.,- in particular field?

mapChars:

mapping load * inline [

From, To

/,

_,

.

];

Reasons:

load MapSubString('mapChars',Reason) as Reason

from reason......;

khasimvali85
Contributor II

Re: how to Eliminate /,.,- in particular field?

Hi Robert,

This is exactly i need the output.

Thanks.

Regards,

Khasim.

Re: how to Eliminate /,.,- in particular field?

You are welcome