Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to union two tables and Group by

Posted on by 440

Hi,

We have AX 2012, We have to tables ProjTransPosting and ProjTransBudget. Both of tables contain ProjID and CategoryID fields.

I would like to get a list of ProjID and CategoryID from these two tables with no duplication by creating a new query. (Union and Distinct)

Please advise

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: How to union two tables and Group by

    Hi Peter,

    You can create query1 with QueryType "Union" and add both tables to this query and select only needed fields for both tables in the query. The next step is to create new View1 based on query1 and selected both fields in the view. Now you can create a new query, add View1 and add a group by criteria.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans