Here's the issue I am having. I want to return rows that are similiar from my table in my database. Consider two rows with the following text:
'Cisco phones cannot dial out'
'Phones are not working for outgoing calls'
These are two different rows...I tried to do something like this:
DECLARE @TheTest varchar(1000)
DECLARE @TheResult varchar(1000)
SET @TheTest = ('Cisco phones cannot dial out')
SET @TheResult = ('Phones are not working for outgoing calls')
CREATE TABLE #Test
(
MyCol varchar(1000)
)
INSERT INTO #Test(MyCol)
SELECT @TheResult
SELECT * FROM #Test WHERE LOWER(MyCol) LIKE '%' + LOWER(@TheTest) + '%'
DROP TABLE #Test
But the result is 0 rows were returned, well I understand that because the string TheTest is not close enough to the string @TheResult...But I need a solution that would actually return this row because the word phones appear in both texts.
Would I have to build something much more elaborate to seperate words and get rid of common words for something like this? I'd like to mimic functionality that I see on a specific website: