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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-08-29 : 07:27:11
|
| Jason writes "I'm having a difficult time with using the LIKE command in a stored procedure. The idea is to use a stored procedure rather than Dynamic SQL for a search. For example:ITEMSItemIDItemNameItemKeywordsSELECT ItemIDFROM ItemsWHERE ItemKeywords LIKE '%@SearchTerm%'However, this doesn't work the way I want it to. Can you help me out on this one? I searched your articles, but couldn't find a solution to this particular challenge." |
|
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2005-08-29 : 07:39:53
|
| [code]SELECT ItemIDFROM ItemsWHERE ItemKeywords LIKE '%' + @SearchTerm + '%'[/code] |
 |
|
|
|
|
|