Good morning,
Been lurking for a while and managed to uncover some great answers to things I needed, but can't seem to find anything for this question.
I have a table with four columns (Code; City; Site; Group). The "Code" column contains a list of numbers, ranging from 3-digit numbers to 11-digit numbers.
I am trying to search for the match for an 11-digit number, matching 11-digits if possible, if not then matching the first 10, then first 9, on a sliding scale.
For example, if I have the following:
Code City Site Group
0123 City 1 Site A Group A
012345 City 2 Site B Group A
01234567 City 3 Site C Group B
I want to search for a match to 01234567890, and return the Site, for example:
01234567 City 3 Site C Group B = "SITE C"
I don't know if this is possible, but thought I'd ask before giving up altogether!
Roj
Been lurking for a while and managed to uncover some great answers to things I needed, but can't seem to find anything for this question.
I have a table with four columns (Code; City; Site; Group). The "Code" column contains a list of numbers, ranging from 3-digit numbers to 11-digit numbers.
I am trying to search for the match for an 11-digit number, matching 11-digits if possible, if not then matching the first 10, then first 9, on a sliding scale.
For example, if I have the following:
Code City Site Group
0123 City 1 Site A Group A
012345 City 2 Site B Group A
01234567 City 3 Site C Group B
I want to search for a match to 01234567890, and return the Site, for example:
01234567 City 3 Site C Group B = "SITE C"
I don't know if this is possible, but thought I'd ask before giving up altogether!
Roj