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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

why distinct is not allowed in SQL Server query of OData ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to fetch the rows from which I don't need duplicate rows.

in SQL I can use distinct but if I use distinct in OData SQL Server query filter it is not allowing...

what is the reason ?

 

I have the same question (0)
  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: why distinct is not allowed in SQL Server query of OData ?

    Hi friend what I know is that in ODATA you can do this operations

     

    System Query Option $filter
    System Query Option $orderby
    System Query Option $top and $skip
    System Query Option $count
    System Query Option $expand
    System Query Option $select
    System Query Option $search

  • v-bacao-msft Profile Picture
    on at
    Re: why distinct is not allowed in SQL Server query of OData ?

     

    Hi @ShivaPatpi ,

     

    Could you please show us how you configure specific actions?

     

    Best Regards,

  • ShivaPatpi Profile Picture
    Microsoft Employee on at
    Re: why distinct is not allowed in SQL Server query of OData ?

    I used this work around

    https://powerusers.microsoft.com/t5/Connecting-To-Data/Use-distinct-on-SQL-connector-query/m-p/160675#M3529

    but my question still remains the same:

     

    Why should I get duplicate values from SQL

    later on why should I do additional work to remove the duplicates by setting the variable and followed by union.

     

    why can't we have a feature request to get rows from SQL  in that ODATA select statement itself ?

  • takolota1 Profile Picture
    4,944 Moderator on at
    Re: why distinct is not allowed in SQL Server query of OData ?

    If you were looking to get distinct records without using the Execute a query action, then you could use this template: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Get-Distinct-Records/td-p/2191533

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard