In an Access Database for field2, the data values could consist of the following:
---field1-------------field2-------
Widget 1-----112398764567
Widget 2-----987611236789
Widget 3-----112345678901
Widget 4-----543287652345
I need a query that will check every 4 characters in the string of field 2 and look for all instances of '1223' OR '9876' are found. So my results would be Widget 1, Widget 2, and Widget 3 records.
Normally, one could right a simple search criteria such as:
where field2 like '*1123*' or '9876'.
However in my case, I need it to check every 4 characters for a match to prevent results from pulling in strings like this: 051123874567
I hope this makes sense. Any ideas would be much appreciated! =)
---field1-------------field2-------
Widget 1-----112398764567
Widget 2-----987611236789
Widget 3-----112345678901
Widget 4-----543287652345
I need a query that will check every 4 characters in the string of field 2 and look for all instances of '1223' OR '9876' are found. So my results would be Widget 1, Widget 2, and Widget 3 records.
Normally, one could right a simple search criteria such as:
where field2 like '*1123*' or '9876'.
However in my case, I need it to check every 4 characters for a match to prevent results from pulling in strings like this: 051123874567
I hope this makes sense. Any ideas would be much appreciated! =)
Comment