To make something as the LIKE
operator in a query, just assign a value to the QueryRange including a wildcard.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| static void QueryBuildRange_Sample(Args _args)
{
Query query = new Query();
QueryRun queryRun;
QueryBuildDataSource qbds;
QueryBuildRange queryRange;
CustTable custTable;
qbds.addDataSource(tableNum(CustTable));
queryRange = qbds.addRange(fieldNum(CustTable, AccountNum));
queryRange.value("axd*");
queryRun = new QueryRun(query);
while(queryRun.next())
{
custTable = queryRun.get(tableNum(CustTable));
print custTable.AccountNum;
}
pause;
}
|