Reputation: 1
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
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