hi guys,
i have a table called TestTable which contains 2 fields qty1 and qty2 i need to add a queryrange like(where qty1 >= qty2)
query q;
TestTable test;
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
queryrun qr;
;
q = new query();
queryBuildDataSource = q.addDataSource(tablenum(TestTable),tablestr(TestTable));
queryBuildRange = queryBuildDataSource.addRange(fieldnum(TestTable,qty1));
queryBuildRange.value(strfmt('> TestTable.qty2'));
//queryBuildRange.value('TestTable.qty1 <= TestTable.qty2');
info(queryBuildRange.toString());
qr = new queryrun(q);
while(qr.next())
{
test =qr.get(TableNum(TestTable));
info(strfmt('%1 > %2',int2str(test.qty1),int2str(test.qty2)));
}
but its not working can anyone help
*This post is locked for comments