Hi all,
I'm currently struggling on a method of how to extracting a list of records through SQL query.
The criteria is simply looking on location code called locn, this code contains a structure of 3~4 characters. The 1st character is alphabet, 2nd is numeric, and 3rd is another alphabet. The 2nd numeric can be 2 digit, which makes the code to 4 characters long.
Its not that difficult to extract the record with simple LIKE functions such as A*, A1*, A12*, or A12A, within the locn only with up to 4 characters input. But the range I written on the topic means if the user enters a range value like this: A1-C20G
The hard part here is, how can I extract the records with this range of input? Do anyone have an idea of how such algorithm be structured? Any help would be greatly appreciated.
I'm currently struggling on a method of how to extracting a list of records through SQL query.
The criteria is simply looking on location code called locn, this code contains a structure of 3~4 characters. The 1st character is alphabet, 2nd is numeric, and 3rd is another alphabet. The 2nd numeric can be 2 digit, which makes the code to 4 characters long.
Its not that difficult to extract the record with simple LIKE functions such as A*, A1*, A12*, or A12A, within the locn only with up to 4 characters input. But the range I written on the topic means if the user enters a range value like this: A1-C20G
The hard part here is, how can I extract the records with this range of input? Do anyone have an idea of how such algorithm be structured? Any help would be greatly appreciated.
Comment