web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Excel SQL WHERE CONTAINS
Power Automate
Answered

Excel SQL WHERE CONTAINS

(0) ShareShare
ReportReport
Posted on by 98

Hi,

 

I'm struggling with the syntax for a SQL query on Excel using PAD. I want to return rows WHERE [COLUMN] CONTAINS the letters 'Civ'. This could be anywhere in the string. If I use %Civ% then PAD looks for a variable called Civ rather than using the % characters as wild cards.

 

I have tried creating a variable called Civ with Civ set as the variable value but that doesn't work.

 

How do you achieve this in PAD?

 

Any help appreciated

I have the same question (0)
  • Verified answer
    kinuasa Profile Picture
    801 Most Valuable Professional on at

    Hi,
    You need to be escaped using another percentage character [%%] as follows.

    SELECT * FROM [Sheet1$] WHERE F1 LIKE '%%Civ%%'

     

    Regards,
    kinuasa

  • lowdmt Profile Picture
    98 on at

    @kinuasa that's exactly what I was looking for. The escape character. 

     

    Thanks 👍

  • lowdmt Profile Picture
    98 on at

    @kinuasa 

     

    How do I search for 2 LIKE queries...

     

    %%Civ%% OR %%Cv%%

     

    LIKE (%%Civ%%,%%Cv%%)

     

    ??

  • kinuasa Profile Picture
    801 Most Valuable Professional on at

    You can specify multiple conditions in the LIKE operator as shown below:

    SELECT * FROM [Sheet1$] WHERE F1 LIKE '%%Civ%%' OR F1 LIKE '%%Cv%%'

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard