Query HAVING clausule in AX

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

This post has 1 Reply | 2 Followers

Not Ranked
Posts 1
10 Points
Joined: Sep 12, 2008
Last Online:
Sep 12, 2008 14:51
rudiwu Posted: Sep 12, 2008 14:51
How helpful was this post/question? Please rate here:

Hi,

How can I add HAVING clausule to query in AX? I build query by QueryBuildDataSource by adding additional suming and grouping steatments but I need to filter resoult by checking value of sum. I make CustTransSplit table that splits custTrans record by goup of iitems, I want too check if values are the same, and filter this  records that sum of splited are different that orginal record:

BR,

Tom

Not Ranked
Posts 3
20 Points
Joined: Sep 9, 2008
Last Online:
Oct 8, 2008 2:20
Joel the Microsoft Evangelist replied on Sep 26, 2008 0:22
How helpful was this comment/solution? Please rate here:

Hey Tom,

I was unable to find a specific method on QueryBuildDataSource of course as you probably didn't either.  I did have a thought, though, that if you use the QueryBuildDataSource.autoSum() to add the aggregate column, you can then use that column in an emulator if statement that checks the value of that summed column to meet what might have been filtered in your hypothetical HAVING statement.  Of course, this only works for a Count style aggregation. MIN or MAX would have to take another route. 

Thanks,

Joel Engstrom

Microsoft ISV Partner Evangelist

Page 1 of 1 (2 items) | Get this RSS feed | Bookmark and Share