Hi,@SteveMaxK
I think this is similar to the where function of google full-text search , to be precise, like googleTosql class, refer to this document, it may be helpful to you.
Best regards,
Bert Zhou
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am able to use the following SQL Server Transact-SQL query to search for a phrase in a column; SELECT * FROM TABLE WHERE CONTAINS(COLUMN,' "Phrase" ').
What I would like to do is search for Phrases that are in a column of text in a table. I have a table called Terminology that has a column called Diagnosis. I would like to be able to search other tables text for phrases in my Terminology table.
I am aware there is a SSIS solution using Term Extraction and Term Lookup, I am looking if there is a solution within Transact-SQL.
Any assistance you can provide will be greatly appreciated.
Hi,@SteveMaxK
I think this is similar to the where function of google full-text search , to be precise, like googleTosql class, refer to this document, it may be helpful to you.
Best regards,
Bert Zhou
If I understand you correctly, you want to do something similar to:
SELECT * FROM Terminology t
WHERE EXISTS (SELECT * FROM YourTable Y
WHERE CONTAINS(Y.YourColumn, t.Diagnosis)
Unfortunately, CONTAINS does not accept a column for input, so you would have to generate a query for each row you want to search for. Or a pattern with all of the words.