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

How to get Standard SQL out from Query Object in AOT?

$
0
0

Hello,

I'm trting to get SQL out of Query Object made in AOT.

Tried this code BUT it only returns the first SQL clause not all ones combined together.

I think that dataSourceNo(1) <= numer one here restrictes getting all SQL code.

Any ideas, how to do it?

 

Query query;    

QueryBuildDataSource qbd;    

QueryBuildRange qbr;    

QueryRun qr;    

;

query = new Query(queryStr(WorkInstructionsQry));    

qbd = query.addDataSource(TableNum(ProdTable));    

qbr = qbd.addRange(FieldNum(ProdTable, ProdId));    

 qbr.value("PRD_00000062");    

 qr = new QueryRun(query);    

 info(qr.query().dataSourceNo(1).toString());

Br

Mike

 


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>