Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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*');
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%';
Hi Alec,
If you are using a SQL statement, you should use LIKE instead of WildMatch:
WHERE FirstName NOT LIKE 'ACCT%'
Best regards,
Daniel
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
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%';
Thank you Marcus. I won't make that mistake again
Thank you swuehl. That did the trick.
Thank you Daniel