Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-04-05 : 05:48:40
|
| please help to retrieve a record by checking if n-number of words are in a column value, the words are jumbled up and they should all appear in that column and set-based (i already have the query for record by record process)example column value: the quick brown fox jumps overanother valuethe brown foxsearch critiera : jumps, quick,theso, only the first one will be retrieved. i tried contains, patindex, join to a table with the criteria words as column values...any help will be appreciated...--------------------keeping it simple... |
|
|
ijprasad
Starting Member
29 Posts |
Posted - 2005-04-05 : 08:43:02
|
| we can help you, if gives the detail problem description with sample dataInderjeet |
 |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-04-05 : 09:00:42
|
JenIs this what you are after[url]http://www.sqlteam.com/item.asp?ItemID=2652[/url]AndyBeauty is in the eyes of the beerholder |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-04-05 : 23:42:58
|
quote: Originally posted by jsmith8858 This might be helpful for you, it sounds like it might be exactly what you need:http://weblogs.sqlteam.com/jeffs/archive/2004/11/02/2460.aspx- Jeff
wow Jeff this is exactly what i need. Thanks for the link, great! I'll study the logic I'll try robvolk's approach too, Thanks Andy --------------------keeping it simple... |
 |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-04-06 : 02:43:23
|
JenI've just noticed from your original post that you tried CONTAINS, have you full-text indexed this table? If so you could use FREETEXTDECLARE @Search varchar(50)SET @Search = 'jumps, quick, the'SELECT *FROM YourTableWHERE FREETEXT(YourCol, @Search) AndyBeauty is in the eyes of the beerholder |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-04-06 : 05:24:27
|
yes, freetext looks promising, i'll try this toothanks again Andy --------------------keeping it simple... |
 |
|
|
|
|
|
|
|