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 :
Microsoft Dynamics CRM (Archived)

Sql to fetchXml limitations

(0) ShareShare
ReportReport
Posted on by 270

I was trying to convert the below Sql request to fetch xml, unfortunately the count and haviang are not supported in fetch xml, is there any way to get this done and have the same result?

select PLI.productID, PLI.Customerid, count(*) as 'Total'

from productlist PLI

   where

       pricelisttype = '100000002'

       and PLI.statecode = 0

       and PLI.productID is not null

       and PLI.Customerid is not null

       and ('2017-04-06' between PLI.Startdate and PLI.EndDate)

       group by PLI.productID,PLI.Customerid

       having count(*)>1

       order by  Total desc

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at
    RE: Sql to fetchXml limitations

    Hi Don,

    You can't use SQL functions in FetchXML query. CRM has support for some built-in functions, but any additional SQL functions are not supported.

    See: www.kingswaysoft.com/.../Limitations-with-CRM-FetchXML

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans