Activity Forums Salesforce® Discussions How to use Soql Wildcards in salesforce?

  • sushant

    Member
    January 13, 2017 at 2:47 pm

    Hi Vikas,

    You can use wildcards like this:

    1  select id, firstname, lastname  from lead where lastname like 'Smith%'

     

    Will match all last names starting with Smith.

     

    2  select id, firstname, lastname  from lead where lastname like 'Smith_'

     

    Will match all last names starting with Smith up to 1 additional character

     

     

    3  Like 'appl_%'

    matches Appleton, Apple, and Bappl , but not Appl

     

    4 Contact.Account.Name LIKE '%Apple%' , '%Pear%'

    Accounts that contain "Apple" and "Pear".

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos