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 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

    Which Industries Can Use Salesforce in 2024?

    Blog in Salesforce

    In today’s digital age, businesses across various sectors are constantly seeking innovative ways to enhance customer relationships, optimize operations, and drive growth. Salesforce, a robust…

    Business Growth, Citizen Engagement, Competitive Advantage, Cost Savings, CRM Platform
    Codleo Jul 24, 2024
    630  Views

    Marketing Success Post Pandemic | Salesforce Success Guide

    Blog in Salesforce

    From everything the world has experienced so far, the pandemic has led to two paths—complete paralysis of the business or a springboard towards success. Simply…

    Articles, audiences, Build a Seamless Experience for Customers, Build Lifelong Relationships, Business
    Apphienz May 6, 2021
    1,983  Views

    What Salesforce's New AgentScript Language Means for Your Agentforce Build

    Blog in Salesforce

    If you've taken an Agentforce build past the demo stage, you've probably hit the same wall every admin and architect hits: the agent works beautifully…

    Agentforce, Salesforce Admin, Salesforce AI, Salesforce Architecture, Salesforce Development
    TechForce Aug 12, 2026
    147  Views

    Popular Salesforce Videos

    WWE Connector for Salesforce

    Video in Salesforce Integration

    In this quick video we will show the Workspace Web Edition Connector for Salesforce. The WWE Connector leverage a powerful browser extension to guarantee a…

    Salesforce Reports, Salesforce Integration, Salesforce Data, Salesforce Integration Consultant, Salesforce Controller Extension
    Ashley Mar 27, 2018
    2,315  Views
    Access Salesforce Maps Schedule and Manage Saved Events

    Access Salesforce Maps Schedule and Manage Saved Events

    Video in Salesforce Training

    Watch this video to learn how to Access Salesforce Maps Schedule and Review and Manage Saved Events. Do let us know in the comment section…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Salesforce Maps
    Abhishek Aug 24, 2021
    1,905  Views
    Salesforce Lightning Training - Creating Hello World Lightning Component

    Salesforce Lightning Training - Creating Hello World Lightning Component

    Video in Lightning, Salesforce Training

    Data Loader is a utility to perform bulk database operation. Recently Salesforce has changed the way data loaders need to be install. I explain end…

    Salesforce Training, Salesforce Lightning, salesforce, Salesforce Lightning Training, Salesforce Video
    Sam J Apr 28, 2020
    2,458  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.