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

Wildcard Match

Hello All,

I have below script in which I used wildcards while loading data. Condition for [Phone No] is if it starts with 9 or 8 or 65 then that row should not be loaded. But, in below case data isn't getting loaded if [Phone No] field is blank. But I want blank [Phone No] field as well to be loaded.

LOAD Distinct

  Upper(Name),        

  Upper(Date) ,      

  Upper(Address),       

  Upper([Phone No])     

        

FROM

(qvd)

Where not WildMatch(Name,'*-*') and

   not WildMatch(Date,'*-*') and

   not WildMatch([Phone No],'9*','8*','65*');

7 Replies
Anonymous
Not applicable

how about adding an OR condition checking if phone No is blank....

RonaldDoes
Partner - Creator III
Partner - Creator III

Hi Mahendra,

WildMatch(Name,'*-*')


Are you sure you want to exclude all names containing a - (such as 'Ronald-Alexander').

If you were trying to exclude Nulls (displayed as "-"), you want to go with:


WHERE NOT ISNULL(Name) AND NOT ISNULL(Date)


Aside from that, I see no reason not WildMatch([Phone No],'9*','8*','65*') should prevent empty phone numbers from being loaded.

kamal_sanguri
Specialist
Specialist

Use this:

LOAD Distinct

  Upper(Name),      

  Upper(Date) ,    

  Upper(Address),    

  Upper([Phone No])  

      

FROM

(qvd)

Where not WildMatch(Name,'*-*') and

  not WildMatch(Date,'*-*') and

  not WildMatch([Phone No],'9*','8*','65*')

    and isnull([Phone No])

and len[Phone No])<1;

mahendragaur
Creator
Creator
Author

Hello Ronald,

yes this is correct WildMatch(Name,'*-*'). The only thing I also wonder why it is not showing value if [Phone No] is blank.

mahendragaur
Creator
Creator
Author

Thanks for your response but it is not working

mahendragaur
Creator
Creator
Author

Hello,

To make this easy to understand I'm attaching demo qvw as well as excel file.

RonaldDoes
Partner - Creator III
Partner - Creator III

Hi Mahendra,

In that case, try:

Where not WildMatch(Name,'*-*') and

   not WildMatch(Date,'*-*')

   and (not WildMatch([Phone No],'9*','8*','65*')

   or IsNull([Phone No]));

Naamloos.png