Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Contains in Stored Procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-24 : 10:45:48
Andy writes "Is there a good way in SQL Server 7.0 for me to use the "contains" predicate with the generation term "formsof" in a stored procedure? For example, if I had the following query:

select title from books where contains(books.keywords, ' FORMSOF (INFLECTIONAL, cooking) ')

And I wanted to create a stored procedure with that query using a variable to search the keywords field for anything. Declaring @keywords and replacing "cooking" with @keywords just searches the keywords column for "@keywords".

Thanks In Advance,
Andy"

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2002-04-24 : 10:58:34
Check out the FAQ's on this site for dynamic SQL. You'll need dynamic SQL to do what you want.

Tim

Go to Top of Page
   

- Advertisement -