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 |
|
manoj.p
Starting Member
1 Post |
Posted - 2010-11-24 : 10:39:56
|
| I have a table which has foll. recordsId Kwd1 maid 2 maids3 mai4 maids in carribean5 Carribean6 Cariibean's maidsFrom above there are few scenarios that user will search for Example 1 : Kwd ="maids"Result : should display 1,2,4,6Id Kwd1 Fashion Designer2 Designer Course3 Designer4 Father5 Fast Bowler6 DesertFrom above there are few scenarios that user will search for Example 2 : Kwd ="Fashion Designer"Result : should display 1,2,3 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-11-24 : 10:46:30
|
| how maids returned 1 & 5? 1 has only maid while 5 doesnt have any matches at all------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-11-24 : 11:58:37
|
| Hmm.Anything you are having problems with or did you just want to let us know what your users will do?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2010-11-24 : 12:30:12
|
| At any rate, you'll want a function to split your input string into a recordset. There are plenty of examples of the code needed to do this. They typically take a string and a delimiter, in your case a blank. Once you have that you can join your Keyword table to the results of the Split function using the LIKE comparison. This should get you what you want.If, after you have this put together, you are still having troubles, show us the code you wrote and we'll see if we can be of service.=======================================No matter what side of the argument you are on, you always find people on your side that you wish were on the other. -Jascha Heifetz, violinist (1901-1987) |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-11-25 : 05:48:58
|
| You should create a full text index on this table and do a FREETEXT search instead.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
|
|
|
|
|
|