How to see the SQL expression of an X++ select statement?

后端 未结 1 754
無奈伤痛
無奈伤痛 2021-01-06 04:03

I have below statement in a job in AX:

select RecId from pjiTable 
    join pID, Type, PrId from sjTable
    where pjiTable.Prid == sjTable.PrId &&
          


        
相关标签:
1条回答
  • 2021-01-06 04:56

    For debugging purposes you can change your select query and use getSQLStatement method on your table:

    select generateOnly forceLiterals RecId from pjiTable 
        join pID, Type, PrId from sjTable 
        where pjiTable.Prid == sjTable.PrId  &&
             (sjTable.Type == PjType::TimeMaterial || sjTable.Type == PjType::FixedPrice);    
    info(pjiTable.getSQLStatement());
    

    This will show you SQL statement without actually executing the statement.

    0 讨论(0)
提交回复
热议问题