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 Platform Community / Forums / Power Automate / why distinct is not al...
Power Automate
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 ?

 

Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,951 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,974 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard