transparent
Programmer
I want to write a stored procedure that I can pass in a list of names (comma seperated) and compare them to the list of names I store in my database.
So far I have a function which successfully creates a temporary table from a list of comma deliminated names (that the user has typed in)
So for example fred, ted, paul, carl -> tbllNames
My sql so far is:
I have a stored proceedure that runs the following sql:
SELECT dbo.Artists.ID, dbo.Artists.Name
FROM dbo.Artists
inner
join #tblNames
on
#tblNames.string like '%' + dbo.Artists.Name +'%'
This works great, but if the user types in a name i.e. harry as hary, I wont get a match.
So its not a great search.
I want to be able to match similar/mis-spelt names.
Is there a way in which I can achieve this level of functionality?