Hi,
I have a table looking like this:
customerID int,
Organisation nvarchar
index nvarchar
The data in the index column can look something like this:
trädgård; trädgårdsmaskin;trädgårdsr
esa,blommo
r;blombuke
tt;
If a user now searches for 'trädgård' I would like the query only to give the result those result that exactly match that word. That is, I want to be able to parse and compare each word between the ; sign. The same true if the user searches for 'trädgård' and 'blommor' I want it to exaclty match the customer that have those two words in their index column.
If I do something like this it searches the word in the whole string:
SELECT * FROM customer WHERE index LIKE '%trädgård%'
Then I get all instances that contains that word and I don't want it to compare it to each word between the ;. Is that possible and if so how can I do it.
Thanks for help!
Peter
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.