Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › Is there any way in query to do Like against a List of Values?

    Tagged: Account, Dynamic Query, List, Salesforce Query, String

    • Salesforce® Discussions

      Is there any way in query to do Like against a List of Values?

      Posted by PRANAV on August 31, 2016 at 3:32 PM

      Hi All,

      Is there any way in query to do Like against a List of Values?

      SELECT Id FROM Account WHERE Name LIKE IN:listName

      where listName is a list of string. I can make a dynamic query by doing OR with all the elements, but I was looking for a more elegant way to do this.

      Thanks

      Mohit replied 10 years, 2 months ago 2 Members · 1 Reply
      • Account
      • Dynamic Query
      • List
      • Salesforce Query
      • String
    • 1 Reply
    • Mohit

      Member
      September 1, 2016 at 6:41 AM

      Hi Pranav,

      You can do this by query like :-

      String[] searchitem = {'%searchtext1%','%searchtext2%'};

      List<Accounts> acc = [select id, name from Account where name like :searchitem];

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Salesforce App Development: Custom vs. Pre-Built Solutions

    Blog in Salesforce

    Businesses use Salesforce to streamline operations, manage customer relationships, and improve productivity. However, choosing the right application development approach is essential to achieving these goals.…

    Salesforce
    Dean Oct 29, 2026
    132  Views

    5 Reasons why you Shouldn’t Ignore Salesforce Google Ads Integration

    Blog in Salesforce integration

    Salesforce Google Ads Integration Marketers set aside a sizeable amount of their total marketing budgets to Google Ads. However, there have been huge challenges with…

    GA Connector in Salesforce, Google Analytics, Marketing Campaigns, ROI, Sales cloud of Salesforce
    LevelShift (formerly DemandBlue) Jan 16, 2019
    3,658  Views

    Retail Business Solutions with Salesforce in 2023

    Blog in Salesforce

    When it comes to a nation’s economic growth, the retail sector is mainly responsible. Consumer spending on retail goods fuels a nation’s ability to generate…

    Artificial Intelligence, B2B, B2C, Building Strategies, Business
    Variance InfoTech Jan 16, 2023
    1,495  Views

    Popular Salesforce Videos

    Salesforce Object Search Language: What is SOSL and when to use SOSL?

    Salesforce Object Search Language: What is SOSL and when to use SOSL?

    Video in Salesforce Apex

    When to Use SOSL? Use SOSL when you don’t know which object or field the data resides in, and you want to: Retrieve data for…

    Salesforce Visualforce, Salesforce Developer, Salesforce Rest API, Apex APIs, Apex SOAP API
    Victoria Nov 23, 2018
    2,312  Views
    Introduction to Programming | Live Salesforce Development

    Introduction to Programming | Live Salesforce Development

    Video in Salesforce Training, Salesforce Development

    Learn Salesforce development from start to finish for free. Want to take your Salesforce Knowledge to the next level? Want to learn advanced Salesforce admin,…

    Salesforce Development, Salesforce Consultant, salesforce knowledge, Salesforce Admin, Salesforce Developers
    Rupal Kakkar Aug 11, 2020
    1,616  Views
    How To Dominate Peak Shopping Seasons with Salesforce Commerce Cloud?

    How To Dominate Peak Shopping Seasons with Salesforce Commerce Cloud?

    Video in Others

    Peak shopping seasons can make or break a business. In our latest webinar, we break down the power of Salesforce Commerce Cloud and how it…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Tutorials, Salesforce Video
    Cyntexa Nov 16, 2023
    1,037  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.