Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
asmithids
Partner - Creator II
Partner - Creator II

Where Not WildMatch Not Working

Hello,

I have a load script below that I need to not include all names that start with 'ACCT' in the FirstName field.  The where clause below is not working and is failing the load script (see attached screen shot).

The where clause looks right based on multiple posts on this topic in the Community.  I'm not seeing where the issue is.  Has anyone dealt with this issue? 

Thank you in advance for any assistance.

Contacts:

LOAD LastName,

    FirstName,

    CompanyName,

    Telephone1,

    Telephone2,

    Email,

  AddressRecordNumber,

  IsPrimaryContact;

SQL SELECT *

FROM METLABCORPORATION.Contacts

WHERE Not WildMatch(FirstName,'ACCT*');

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Marcus is right that you can only use Wildmatch in the LOAD statement.

It might be preferable to let the DBMS filter the records, so something like this should also work:

Contacts:

LOAD LastName,

    FirstName,

    CompanyName,

    Telephone1,

    Telephone2,

    Email,

  AddressRecordNumber,

  IsPrimaryContact;

SQL SELECT *

FROM METLABCORPORATION.Contacts

WHERE FirstName NOT LIKE 'ACCT%';

View solution in original post

6 Replies
Not applicable

Hi Alec,

If you are using a SQL statement, you should use LIKE instead of WildMatch:

WHERE FirstName NOT LIKE 'ACCT%'

Best regards,

Daniel

marcus_sommer

The where condition with wildmatch() which is a qv-functions needs to applied to the preceeding-load:

Contacts:

LOAD LastName,

    FirstName,

    CompanyName,

    Telephone1,

    Telephone2,

    Email,

  AddressRecordNumber,

  IsPrimaryContact

WHERE Not WildMatch(FirstName,'ACCT*');

SQL SELECT *

FROM METLABCORPORATION.Contacts;

- Marcus

swuehl
MVP
MVP

Marcus is right that you can only use Wildmatch in the LOAD statement.

It might be preferable to let the DBMS filter the records, so something like this should also work:

Contacts:

LOAD LastName,

    FirstName,

    CompanyName,

    Telephone1,

    Telephone2,

    Email,

  AddressRecordNumber,

  IsPrimaryContact;

SQL SELECT *

FROM METLABCORPORATION.Contacts

WHERE FirstName NOT LIKE 'ACCT%';

asmithids
Partner - Creator II
Partner - Creator II
Author

Thank you Marcus.  I won't make that mistake again

asmithids
Partner - Creator II
Partner - Creator II
Author

Thank you swuehl.  That did the trick. 

asmithids
Partner - Creator II
Partner - Creator II
Author

Thank you Daniel