Help from any DB admins -
How do you deal with user input?
A little background...
I have a DB of about 1500 rows, and each one has a unique item number that includes numbers, letters, and dashes (no actual spaces in the item number)
examples: 55-ADPR-1024, 07-EACH-2213
The problem I have is that users, like all of us, are lazy, and want to be able to type partial item numbers. Usually they substitute a space for a dash, as its easier to reach, or just don't include it at all.
I want this to happen
Search for "RBP4" -> return results for "RBP-4", "RBP", and "RBP4" in the item number field
What do you guys recommend? I'm thinking something along the lines of split the entered term everywhere a number is next to a letter, and search for the original term, plus the terms separately, plus the terms with a dash between them.
How do you deal with user input?
A little background...
I have a DB of about 1500 rows, and each one has a unique item number that includes numbers, letters, and dashes (no actual spaces in the item number)
examples: 55-ADPR-1024, 07-EACH-2213
The problem I have is that users, like all of us, are lazy, and want to be able to type partial item numbers. Usually they substitute a space for a dash, as its easier to reach, or just don't include it at all.
I want this to happen
Search for "RBP4" -> return results for "RBP-4", "RBP", and "RBP4" in the item number field
What do you guys recommend? I'm thinking something along the lines of split the entered term everywhere a number is next to a letter, and search for the original term, plus the terms separately, plus the terms with a dash between them.