1

I have this sql:

SELECT NAME,
       SUM(DECODE(feedbackType, 1, 1, 0)) AS sum_feedback1,
       SUM(DECODE(feedbackType, 2, 1, 0)) AS sum_feedback2
FROM   TABLE
GROUP BY
       NAME;

that I wish to convert into FetchXml. Been looking for "conditional aggregates" but no success, maybe someone here can help me?

3
  • Have you tried building this as two separate FetchXML queries (one for each sum)? Commented Nov 4, 2016 at 11:08
  • Have not tried separate FetchXmls, what i did at the moment is to fetch all the records (filter applied) then do the grouping and aggregation in RS. I believe James (Wood) is correct that the sql in question cannot be converted to FetchXml (ie limitation/feature) Commented Nov 7, 2016 at 6:18
  • You can ask here for feature support: ideas.dynamics.com Commented May 15, 2017 at 9:54

1 Answer 1

1

You can't do that in FetchXml as far as I'm aware.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.