You need to sign in to do that
Don't have an account?
ColoradoMike
Suggestion about SELECT statement with LIKE?
Hello,
I'm trying to do a SOQL SELECT statement where I search for a number of contacts whose Accounts contain one of several search terms. Say I want contacts from Accounts that contain "Apple" and "Pear".
What I would like to do is this, but it doesn't work:
SELECT Firstname, Lastname from Contact WHERE Contact.Account.Name LIKE '%Apple%' , '%Pear%'
I suppose I could do this (which works, but is a lot longer):
SELECT Firstname, Lastname from Contact WHERE (Contact.Account.Name LIKE '%Apple%' ) OR (C ontact.Account.Name LIKE '%Pear%').
Does anyone have any better way to use LIKE with multiple search parameters?
Thanks!
I'm trying to do a SOQL SELECT statement where I search for a number of contacts whose Accounts contain one of several search terms. Say I want contacts from Accounts that contain "Apple" and "Pear".
What I would like to do is this, but it doesn't work:
SELECT Firstname, Lastname from Contact WHERE Contact.Account.Name LIKE '%Apple%' , '%Pear%'
I suppose I could do this (which works, but is a lot longer):
SELECT Firstname, Lastname from Contact WHERE (Contact.Account.Name LIKE '%Apple%' ) OR (C ontact.Account.Name LIKE '%Pear%').
Does anyone have any better way to use LIKE with multiple search parameters?
Thanks!