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 |
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-03-20 : 00:45:29
|
| i have several tables refered to as table A, with sentenses in each fieldand one table B with a word in each fieldwhat i would like to do is find if ANY of table A's fields contain any word found in table B.for example:table A:1 | i like sql2 | i am sql3 | sql team will be able to figure this outtable B:1 | SQL2 | soccerthe query would see if table A containt the words SQL or (not and) soccer. |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2007-03-20 : 01:31:14
|
| Have you looked at text indexing? |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2007-03-20 : 04:01:31
|
There are 2 ways to achieve this one as suggested my LozInSpace and the Second is using join with Like operatorsSelect * From TableA A Inner Join TableB B On A.Col1 Like '%' + B.Col1 + '%' Chiraghttp://chirikworld.blogspot.com/ |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-03-20 : 18:24:09
|
| excellent work guys thanx |
 |
|
|
|
|
|