Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Omitting certain string descriptions from a field.

Hello there folks,


I am trying to figure something out here, I would like to remove all descriptions from a field which starts with the character '.' and '-'.


I have tried the below script but failed badly, could anyone point me in the right direction or advise on what am doing wrong here.


Table_A:

Load

[Country],

[Date],

[BrandDesc]

from ....

where [BrandDesc] <> '.*' and [BrandDesc] <> '-*';

Thanks in advance.

Best Regards,

Ram

1 Solution

Accepted Solutions
MVP
MVP

Re: Omitting certain string descriptions from a field.

Use WildMatch() function. Like:

Table_A:

Load

[Country],

[Date],

[BrandDesc]

from ....

where Not WildMatch([BrandDesc], '.*' , '-*' );

6 Replies
MVP
MVP

Re: Omitting certain string descriptions from a field.

Use WildMatch() function. Like:

Table_A:

Load

[Country],

[Date],

[BrandDesc]

from ....

where Not WildMatch([BrandDesc], '.*' , '-*' );

Sokkorn
Honored Contributor

Re: Omitting certain string descriptions from a field.

Hi Ram,

Are you load data from QVD? If yes, then try

Where not WildMatch([BrandDesc],'.*','-*');

Not applicable

Re: Omitting certain string descriptions from a field.

Thanks! Spot on.

Not applicable

Re: Omitting certain string descriptions from a field.

Thanks! Spot on.

Not applicable

Re: Omitting certain string descriptions from a field.

Hi,

If you only want to remove these description but keep the rest of the fields for each record of the table I suggest using the following:

Table_A:

Load

[Country],

[Date],

If(not( Left([BrandDesc],1)='.') or not( Left([BrandDesc],1)='-'), [BrandDesc] ,null()) as [BrandDesc]

from ...;

Regards

Not applicable

Re: Omitting certain string descriptions from a field.

Thanks!

Community Browser