473,625 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSSQL Full text search question

1 New Member
Hi

I am trying to do a full text search with a column name for the search term.
I can do this using LIKE with:

Expand|Select|Wrap|Line Numbers
  1. SELECT tblContent.ID FROM tblContent INNER JOIN #keywords ON  tblContent.words LIKE '%' + #keywords.keyword + '%'
But I can not seem to do this using the CONTAINS syntax.
eg.

Expand|Select|Wrap|Line Numbers
  1. SELECT tblContent.ID FROM tblContent, #keywords WHERE CONTAINS(words,#keywords.keyword)
The reason I am trying to do this is because my final search result must contain all the words in the search phrase, even if they are not next to each other. (The search involves fields across multiple tables.) To achieve this I have split the search phrase into a temporary table. Then once all the possible tables/columns have been searched and appended to another temporary table I can remove the results that have not scored for all the words in the search phrase. I was trying to speed the process up with full text search.

I also thought there might be a way of doing this using CONTAINSTABLE rank, but I can not see how.

Any help would be much appreciated.
Mar 11 '08 #1
0 1757

Sign in to post your reply or Sign up for a free account.

Similar topics

4
6044
by: dave | last post by:
I am wondering if the following can be done. I want to setup a search page that utilizes full text searching in sql2000. I want the user to type in say "where is bill" and have the query search across multiple columns in multiple tables and return a single list of results so that i can show unique records that are returned. The problem is that my data for 1 record is split across multiple tables so that the search has to occur in each
0
2720
by: Tracey | last post by:
Hi there, I want to search Japanese characters with Full Text search function. I created a table (tbSearch) for Full-text search on SQL 2000, English Win2k Server. The table contains 4 fields, which are ID -- int, primary key, identity; PageName -- nvarchar; Contents -- ntext; Keywords -- ntext. Defined a Full Text index and Full Text catalog in the Full Text Index Wizards and selected "Neutral" from "Language for Word Breaker", the
2
1781
by: | last post by:
Hi all, I'm here to humbly request some "gimme" help from the group. I discovered the infinite wonders of VS.NET 2005 and ASP.NET 2.0 at Tech Ed a couple of weeks ago, and since returning to work I haven't looked back. Unfortunately I still have some critical functions that I originally created as vbscript functions. I need these functions to do my work. Before I can transition entirely to C#-based ASP.NET sites, I need these functions...
1
3474
by: Liu, Mingyi | last post by:
Sorry if this question has been asked before. I tried to search in postgres mailing lists at http://archives.postgresql.org/pgsql-general/ just now and it gave me error "An error occured! Can not connect to search daemon". Anyway I installed tsearch2 and openFTS and was able to do some searches. However, when I checked searching partial words, it of course does not work(unless the partial word just happens to be the indexed version). IMHO,...
7
3198
by: Mark Knochen | last post by:
Hallo, i have a MS SQL Database with some tables with textfields. in the textfields are long strings ... but i cant get the full string from the table ... i get only ca. 8000 chars ... Mark
1
5335
by: RAM | last post by:
Hello, I have installed SQL Server 2005 Express Edition Advanced Services and SQL Server 2005 Express Edition Toolkit SP1. I cannot use full-text search. When I called: exec sp_fulltext_service 'load_os_resources', 1; exec sp_fulltext_service 'verify_signature', 0; go I got error:
7
6502
by: Olegus | last post by:
Hello, in order to perform backup/restore MSSQL database using SMO, one needs to reference several namespaces in a backup class : using Microsoft.SqlServer.Management.Common; using Microsoft.SqlServer.Management.Smo; Unfortunately, MSSQL 2005 and MSSQL Express keep them in different place. For MSSQL2005 they are located in C:\Program Files\Microsoft SQL Server \90\SDK\Assemblies and for MSSQL Express you can find them in C:
8
5093
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are indexed). dbo.maintable(ProfileID int pk) dbo.fts_table(ProfileID int pk fk, col1 xml, col2 xml, col3 xml) I want to perform a query that will return any rows that contain ‘x’ and ‘y’ in any columns. I.e. ‘x’ could be in col1 and ‘y’ could be in
65
5057
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but got errors of Failed to open file ./outdir/mytestout.txt. Below is the code: #include <stdio.h>
0
8182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.