I wanted to search some person on my data base (my application has been developed in c# and data base is Microsoft SQL server 2008).
User want to looking for this name "John Alan" :
Scenario 1: User entered "john alan", it's OK I can found it with my SP on Database
Scenario 2: User entered "johnalan" whit no space between name and family
Scenario 3: User entered "joh nalan" whit a wrong space place
I have no problem with scenario but how can handle numbers 2 and 3?
I did some search on the internet but I did not know what should I exactly looking for, If is that a Technic or algorithm or kind of T-SQL query or c# code please give me a name or help me.
My table has two columns:
Name Family
------- -------
john alan