user3116806
user3116806

Reputation: 1

how to do whole word search in multi keywords string

Need help for search multi keywords:

For 2 keywords string: img_keywords(1)="error bar, cloumn", img_keywords(2)="bar, graph", how to search "bar, abc", just return the second string?

Tried SELECT * FROM images WHERE CONTAINS(img_KeyWords, '"bar" OR "abc" ' ), return both strings. But, should just be the second one match.

Upvotes: 0

Views: 47

Answers (1)

Kyle B.
Kyle B.

Reputation: 5787

I asked a similar question in the past (SQL 2005 Split Comma Separated Column on Delimiter). Honestly, you shouldn't store csv data in scalar columns. There isn't a performance efficient way to manage that.

If you were to split those values into a relational table, it would solve your query issue.

Upvotes: 1

Related Questions