包含AND子句以使用AX AOT 2012进行查询

时间:2017-10-02 19:22:02

标签: sql-server microsoft-dynamics dynamics-ax-2012 aot

我想将查询从sql导出到动态,所以我创建一个AOT查询然后我为它创建视图。

SQL QUERY

SELECT
TT.RECID,
TT.TRANSDATE,
TT.DATAAREAID,
TT.SOURCERECID,
TT.SOURCEBASEAMOUNTCUR,
TT.SOURCETAXAMOUNTCUR,
TTGJAERIVA.TAXTRANSRELATIONSHIP,
TTGJAERIVA.GENERALJOURNALACCOUNTENTRY,
TTGJAERIVA.LEDGERDIMENSION,
GJAERIVA.TEXT,
GJAERIVA.LEDGERDIMENSION AS LEDGERDIMENSIONGAE,
GJAERIVA.POSTINGTYPE
FROM TAXTRANS TT 
INNER MERGE JOIN TAXTRANSGENERALJOURNALACCOUNTENTRY TTGJAERIVA ON TTGJAERIVA.TAXTRANS = TT.RECID
INNER MERGE JOIN GENERALJOURNALACCOUNTENTRY GJAERIVA ON TTGJAERIVA.GENERALJOURNALACCOUNTENTRY = GJAERIVA.RECID 
AND GJAERIVA.POSTINGTYPE IN( 14,236,71,41)

INNER JOINS子句外,我的所有查询都包含AND。如何在AX 2012上使用Query添加AND子句?

当前查询:

Query

1 个答案:

答案 0 :(得分:1)

您可以通过在所需字段上为所需字段创建范围(在“范围”节点下)来实现此目的。您可以使用范围的Value属性中的逗号分隔值为该范围指定多个值。