Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a need to extract up to 4, 9-digit consecutive numbers from an unstructured text string in a load script. Here is an example,
JtR56743 tid lengths,,123456789 0846 987654321nnbfetgw,135796616
Result is:
123456789
987654321
135796616
Mike F
Try this method
1. Replace all non digit symbols with an odd symbol like '|'.
2. Run the data through subfield() using only two parameters, like this
SubField(YourField, '|') as SubNumber
3. You now have generated a row per number in dour data, now you need to filter it. You can do that by loading a Resident load on your output table with a where condition.
Noconcatenate LOAD... RESIDENT... WHERE LEN (SubNumber) =9
4. You now have a table containing your 9 digit values.
Good luck!
Try this method
1. Replace all non digit symbols with an odd symbol like '|'.
2. Run the data through subfield() using only two parameters, like this
SubField(YourField, '|') as SubNumber
3. You now have generated a row per number in dour data, now you need to filter it. You can do that by loading a Resident load on your output table with a where condition.
Noconcatenate LOAD... RESIDENT... WHERE LEN (SubNumber) =9
4. You now have a table containing your 9 digit values.
Good luck!