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 |
|
looc
Starting Member
10 Posts |
Posted - 2009-07-07 : 05:06:28
|
| HiQuestion about full-text search, i have set up a table with two collumns, title and bodyI have added a full-text to include both columns.Now i want to search "google"-style in both columns but i cant get a hit from both at the same querie.The table include a row: title = abc123, body = xyz987select title from table where contains((title,body), 'abc123 AND xyz987') is not workingselect title from table where contains((title,body), 'abc123) is working andselect title from table where contains((title,body), 'xyz987') is workingHow can i get FT to return hits from two different columns?/bjorn |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-07-07 : 05:08:36
|
| r u using MSSql server or any other ? |
 |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-07-07 : 05:12:24
|
quote: 'abc123' AND 'xyz987'
possible is missing ''?AMITOFO+AMEN+YA ALLAH Hope the query works |
 |
|
|
looc
Starting Member
10 Posts |
Posted - 2009-07-07 : 05:15:32
|
| Hi.Running mssql 2005No , problem is not that chars is missing, i have tried all sorts of combinations with " and *If i try to search keewords in two different columns i just dont get any hits. If is search for two keewords in same column i get hits.The columns is nvarchar(MAX)/bjorn |
 |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-07-07 : 05:20:30
|
| [code]SELECT * FROM ( select title from table where contains((title,body), 'abc123) )a JOIN ( select title from table where contains((title,body), 'xyz987') )b on a.title=b.title and a.body=b.body[/code]Like that works?Sorry if don't work but im also new to sql ^^AMITOFO+AMEN+YA ALLAH Hope the query works |
 |
|
|
looc
Starting Member
10 Posts |
Posted - 2009-07-08 : 02:24:29
|
HiNo this is not the solution i was looking for.This must be a common problem, or?/b.quote: Originally posted by waterduck
SELECT * FROM ( select title from table where contains((title,body), 'abc123) )a JOIN ( select title from table where contains((title,body), 'xyz987') )b on a.title=b.title and a.body=b.body Like that works?Sorry if don't work but im also new to sql ^^AMITOFO+AMEN+YA ALLAH Hope the query works
|
 |
|
|
|
|
|
|
|