Sorry about the confusion and thank you for your reply
I did actually mean from 2 columns in one table
Thank you for your suggestion although it does not quite help me, as I do not know that the first word in the search string will be from one column and second word from the other. Also someone could have n umber of words in the search string
Is there another way rather than merging the columns into one column, as this would work
Thanks in advance
R
----- John Kane wrote: ----
RP
You're statements are a bit confusing... Are you "search multiple columns
or "two tables 'Category' and 'Description'
I think you're miss-understanding the use of CONTAINS in your stored pro
sp01_searchRequisite. Your FROM clause should be from one or both of you
FT-enable tables ('Category' and 'Description' ?) and not, I'm assuming th
FT Catalog name: pgT001_RequisiteCatalogue
Assuming one table (pgT001_RequisiteCatalogue) and multiple columns, yo
could do the following (example from the northwind database and tables) an
using CONTAINSTABLE
SELECT e.LastName, e.FirstName, e.Title, e.Note
from Employees AS e
containstable(Employees, Notes, 'BA') as A
containstable(Employees, Title, 'Sales') as
wher
A.[KEY] = e.EmployeeID an
B.[KEY] = e.EmployeeI
Assuming mutiple tables and therefore multiple FT-enable columns (one colum
from each table), you could do the following
SELECT e.LastName, e.FirstName, e.Title, e.Notes t.TerritoryI
from Employees AS e, EmployeeTerritories t
containstable(Employees, Notes, 'BA') as A
containstable(EmployeeTerritories, TerritoryID, 'Sales') as
wher
A.[KEY] = e.EmployeeID an
B.[KEY] = e.EmployeeI
Note, in order for this example to work, you must alter the tabl
EmployeeTerritories and add a single non-null column in order to use as th
FT-Index key. If this is not what you're looking for, could you post a mor
precise example of what you're looking for
Thanks
Joh
"RoastedPigeon" <julian.patmore@hertscc.gov.uk> wrote in messag
news:29A65A8C-D74F-4EC6-AD1B-6CBFF1CE7CCA@microsoft.com..
[quoted text, click to view] > Can someone please help me
>> I have one table which I need to search multiple columns on
> The table looks similar to thi
>> id Category Descriptio
> -------------------------------------------------------------------------
> 0 Gardening Equipment Rak
> 1 Gardening Equipmen Spad
>> I need to be able to search on 'Garden AND rake
> so that the first row comes up
>> Currently I have made on a Full-Text catalogue on this table using the tw
tables 'Category' and 'Description
>> and written the following stored procedur
>> CREATE PROCEDURE dbo.sp01_searchRequisit
> @searchString varchar(50
>> A
>> SELECT Category, Descriptio
> FROM pgT001_RequisiteCatalogu
> WHERE CONTAINS(*, @searchString
>> G
>> This returns 0 results
>> Any ideas or suggestions are more than welcome
>> Many thank
>> R