Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

SQL in ("number with hyphen") cannot extract data

(0) ShareShare
ReportReport
Posted on by

Hi guys.

 

Using PAD i am trying to run SQL query on Excel file but having problem with value that has hyphen in the middle of it.

 

my sql is 

 

select sum([Sales])

where shop in ("7-11")

 

 

it can run but returns 0 as value.

 

is there any solution to do this?

 

thank you

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: SQL in ("number with hyphen") cannot extract data

    Are you supposed to be using in here? What would the values of shop be?

     

    Where you after something like this instead:

     

    SELECT sum([Sales])
    WHERE CONTAINS(shop, '7-11');

     

    Or possibly:

     

    SELECT sum([Sales])
    WHERE shop like '%7-11%';

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,587 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow