SQL Search Query

  • Thread starter Thread starter Jamie Bray
  • Start date Start date
J

Jamie Bray

I have writtena IT Support Helpdesk database. I am
currently stuck, i am trying to create a search facility
that will let me search a field and display the values. I
thought that the best way to do this would be via an SQL
statment that uses Like. I have a table called Search that
i can add the word i want to search for. However IT
doesn't seem to work because it turning [Search] into a
straing rather than retriving the values stored in
[Search]. Does anyone have any ideas as to how to create a
search facility to find records that contain the word in
the table search?

SELECT dbo.[Closed Jobs].Problem
FROM dbo.[Closed Jobs] CROSS JOIN
dbo.Search
WHERE (dbo.[Closed Jobs].Problem LIKE '%[Search]%')
 
Hi,


You can use CONTAINS, if you pre-set the Full-Text Searching extension.
CONTAINS allow you to search for exact word, their variations ('product',
'products'), and combinations, or even with "weight" for words you may look
for:



SELECT *
FROM Products
WHERE CONTAINS( *, 'ISABOUT(spicy weight(.8), supreme weight(.2), hot
weight(.1))')



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top