In transact sql i have:
DECLARE @phrase='KeyWord1 KeyWord2 ,KeyWord3 ' -- and my be more separated by space,comma or ;(but mainly by space=it's a phrase)
I have a table Students
Students
(
StudentId bigint,
FullName nvarchar(50),
Article nvarchar(max)
)
I want to filter students by articles by bringing those whom article conatains a word of @phrase
Something like:
DECLARE @WOrdTable TABLE
(
Word nvarchar(50)
)
INSERT INTO @WOrdTable
SELECT WOrd of @phrase
SELECT *
FROM Students
WHERE Article LIKE (Word in @phrase)