Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Subquery in AX View

$
0
0

AX allows you to enter basic SQL into View ranges.  For example, in an AOT view's range, for the match value, you could enter (StatRepInterval.Name == 'Weekly').  This works nicely.

However, I need to do a more advanced lookup on a View, using a subquery.  Can anyone suggest a way to do this? 

This is what I would like to use, but I receive an error: "Query extended range failure: Syntax error near 34."

(StatRepInterval.Name == (SELECT FIRSTONLY StatRepInterval.Name FROM StatRepInterval WHERE StatRepInterval.PrintDirection == 1 ORDER BY StatRepInterval.Name DESC))

I've tried a lot of different variants of the subquery, from straight T-SQL to X++ SQL, but nothing seems to work. 

Thanks for the help.


Viewing all articles
Browse latest Browse all 175888

Trending Articles