Usando o like normal:
1 2 | select firstonly purchTable where purchTable.purchId like '09*'; |
Quando você quiser ter todos os outros registros (not like), no X++ você tem 3 possibilidades:
1.!LIKE :
1 2 | select firstonly purchTable where !(purchTable.purchId like '09*'); |
2. notExists join :
1 2 3 | select firstonly purchTable notExists join refPurchTable where purchTable.purchId == '09*'; |
3. Query-object :
1 2 3 4 5 6 7 8 9 10 11 | Query query = new Query(); QueryRun queryRun; ; query.addDataSource(tableNum(PurchTable)).addRange(fieldNum(PurchTable, PurchId)).value('!09*'); queryRun = new QueryRun(query); if(queryRun.next()) { purchTable = queryRun.get(tableNum(PurchTable)); print purchTable.PurchId; } pause; |
Fonte: http://www.doens.be/
[]s
Pichler
| Belo Horizonte, Brazil | 1 |
| Saint Petersburg, Russian Federation | 1 |
| Porto Alegre, Brazil | 1 |
Leave a reply