Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
siva_boggarapu
Creator II
Creator II

How to remove '--'(special character) from the field?

Hello There,

I have a table where I need to exclude '--' which is not a null. Could you please advice how to fielter.         

11 Replies
its_anandrjs

Hi,

You need to use the subfield command to exclude this type of symbols from the data.

Regards,

Anand

SunilChauhan
Champion
Champion

may be this one

Load *

from path where columnname<>'--';

Sunil Chauhan
its_anandrjs

Hi,

You need to write some thing like this code

=Subfield(ColA,'-',1) to exclude the symbol '--' from any data from the load script or any of the object level you are able to do that.

Reagrds

Anand

its_anandrjs

Hi,

See the attached sample for clearity it is ok for you.

Reagrds

Anand

its_anandrjs

Hi,

In load script you need to write some thing like this

Temp:

load * inline

[

ColA

asasasfs--

dddd--

ddd----

fsfsf----

];

load

Subfield(ColA,'-',1) as CleanField

 

Resident Temp;

or in object level you need to put Subfield(ColA,'-',1) on any object like list box any other object

Regards

Anand

its_anandrjs

Hi,

You need to do some changes in your load script or in onject level where ever you want it

put this code if you want to exclue from data like

ColA

fdfd

fdgdg

---

--

sads

Just put

If(ColA>Len(Chr(196)),ColA)

And if you want to remove it from any data which is like

ColA

ColA

asasasfs

dddd

dd

dffa----

fsfsf

dasds--

dasa-----------

www

rrrrr

If(ColA>Len(Chr(196)),Subfield(ColA,'-',1)

See the attached sample file 

Regards

Anand

its_anandrjs

Hi,

If you got correct answer so mark it correct so other will not try it.

Regards

Anand

harleen_singh
Creator III
Creator III

Hello siva.boggarapu

                                use the PurgeChar (string,'-') function like this

if ur field or string is abc--cde

PurgeChar('abc-cde','-')

it will give output abccde.

thanks

Lavi

its_anandrjs

Hi,

If there are several types of symbols in the tring and you want to remove it you are able to remove it by the use of Purgechar( ) command like

If string are like

ColA

sdasdasd----

asd---dsds

----sds

you have to put Put a code like =Purgechar( ColA, ' - ' )

or if string are like

ColA

sdasdasd----

asd---dsds

----sds

---(((fdfd

you have to Put a code like =Purgechar( Purgechar( ColA, ' - ' ), ' ( ' )

if there is any type of symbol acording to that you have to use it.

Regards,

Anand