Simplified scenario, I have a table with the following fields/values:
ID value
1 '12345'
2 '1234'
3 '123'
4 '12'
5 '1'
I want to find the record that is the closest to A=’1230′ and it should correspond to ID=3.
The only implementation I have in mind now is basic… Use a loop to iterate through A substring and do the comparison.
Is there a better way to solve this?
Will appreciate your help
Or using like…