MSSQL 7.0 beta
I full-text- indexed my table and it is fully operational
I need a help with this SP syntax
CREATE  PROCEDURE SPsearchGeneraldescription
@str char(10)
SELECT Auto, description
FROM [general]  
WHERE CONTAINS (description,  '@str')
It returns 0 rows, no errors but similar select statement
returns plenty of rows, I tried double quotes too surrounding argument
Without quotes I got syntax error
Any help appreciated
Who is Participating?

Improve company productivity with a Business Account.Sign Up

formulaConnect With a Mentor Commented:
Do the following:

1) Add statement to create a Search string in stored procedure:
   declare @newstring varchar(10)
   select @newstring = "%"+@str+"%"
2) Modify Select
   SELECT Auto, description
   FROM [general]  
   WHERE description like @newstring

mativareAuthor Commented:
Edited text of question
mativareAuthor Commented:
It works, but it takes away power of CONTAINS
see question Search II too
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.