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 Apps / SQl query to Fetch XML...
Power Apps
Unanswered

SQl query to Fetch XML query

(0) ShareShare
ReportReport
Posted on by
Hi,

I want to convert SQL query to Datavese fetch xml query.


Select top 100 discussion, createdon, mostrecentdate

from mspwrplt_cmty_discussionthread

where record='548sc5e'

ORDER BY 

CASE 

    WHEN createdon < mostrecentdateTHEN mostrecentdate

    ELSE  createdon

END DESC;

 
 
I have the same question (0)
  • Verified answer
    MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at
    SQl query to Fetch XML query
    to convert
  • Verified answer
    ankit_singhal Profile Picture
    590 Super User 2025 Season 2 on at
    SQl query to Fetch XML query
    You can use CRM tool box or its simple you can go in advance find and select you entity and applied same filter there and download fetch xml file 
  • Verified answer
    Shashank Bhide Profile Picture
    942 Moderator on at
    SQl query to Fetch XML query
    FetchXML doesn't have built in CASE....WHEN...THEN, otherwise you can use the tools suggested by other community members in the post.
  • Mohit ENG Profile Picture
    on at
    SQl query to Fetch XML query
    Thanks for the response .
  • Jatinkumar Profile Picture
    on at
    SQl query to Fetch XML query
    Hi @Mohit
  • Jatinkumar Profile Picture
    on at
    SQl query to Fetch XML query
  • Jatinkumar Profile Picture
    on at
    SQl query to Fetch XML query
    Smoke test

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard