Hello
I would like to add a range to a query in order to obtain the following equivalent result in SQL :
select * from CUSTTRANS where not((custtrans.TRANSTYPE = 15) and (CUSTTRANS.LASTSETTLEVOUCHER = ''))
Here is what I have done so far, but does not return the correct query :
str rangeStr;
rangeStr = strFmt('!((%1 == %2) && (%3 == ""))',
fieldStr(CustTrans, TransType),
any2int(LedgerTransType::Payment),
fieldStr(CustTrans, LastSettleVoucher));
CustTrans_ds.query().dataSourceTable(tablenum(CustTrans)).addRange(fieldnum(CustTrans, TransType)).value(rangeStr);
super();
*This post is locked for comments
I have the same question (0)