M Holland
M Holland

Reputation: 11

Combine two queries and also weight to a column using FREETEXTTABLE?

I have these two queries that give me what I want:

1)

SELECT sr.ServicesResourcesID AS ID, sr.Title, sr.ContactFirstName, sr.ContactLastName, sr.ContactEmail, sr.ContactPhone, sr.FileName, sr.URL, sr.Description AS Description, rt.Type, KEY_TBL.RANK 
FROMvResourceType rt,vServicesResources sr
INNER JOIN FREETEXTTABLE(ServicesResources, Title, 'computers') AS KEY_TBL
ON sr.ServicesResourcesID = KEY_TBL.[KEY] 
WHERE sr.ResourceTypeID = rt.ResourceTypeID
ORDER BY RANK DESC

2)

SELECT sr.ServicesResourcesID AS ID, sr.Title, sr.ContactFirstName, sr.ContactLastName, sr.ContactEmail, sr.ContactPhone, sr.FileName, sr.URL, sr.Description AS Description, rt.Type, KEY_TBL.RANK 
FROMvResourceType rt,vServicesResources sr
INNER JOIN FREETEXTTABLE(ServicesResources, Description, 'computers') AS KEY_TBL
ON sr.ServicesResourcesID = KEY_TBL.[KEY] 
WHERE sr.ResourceTypeID = rt.ResourceTypeID
ORDER BY RANK DESC

They are basically the same query. One searches the title, the other, the description. I'd like to combine them AND give more weight to the Title.

Any ideas? TIA.

Upvotes: 1

Views: 146

Answers (0)

Related Questions