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

Strange Behavior when try to use real values on queries

$
0
0

Hi folks,

Today a friend of mine have asked me about a strange behavior when he tried to pass a real value to a query in DAX2009. When I tried I was suprised because I've never seen this.

The code:

static void testeParaDiego(Args _args)

{

   Query                       q;

   QueryBuildDataSource        qbds;

   QueryBuildRange             qbr;

   Real                        realValue = 3;

   ;

   q       = new Query();

   qbds    = q.addDataSource(tableNum(CustTransOpen), "CustTransOpen");

   qbr     = qbds.addRange(fieldNum(CustTransOpen, AmountMST));

   qbr.value(SysQuery::value(realValue));

   info(q.dataSourceNo(1).toString());

}

Can anyone help me to understand what happened on this case? What I'm doing wrong? The result was:

SELECT FIRSTFAST * FROM CustTransOpen WHERE ((AmountMST = 3.E0))

(it's a simple example just to reproduce the cenario)

Regards,

Ricardo Pichler


Viewing all articles
Browse latest Browse all 72043

Trending Articles



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