|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to use LIKE in a store procedureHow can you use a like-search in a SP
ALTER PROCEDURE dbo.spSearch ( @s varchar(50) ) AS SET NOCOUNT ON SELECT * FROM tbl where name LIKE @s What is I need to do a '%@s%' ?? Thanks It sounds like you might be looking for:
SELECT * FROM tbl where name LIKE '%' + @s + '%' Roy Harvey Beacon Falls, CT Show quoteHide quote On Sat, 22 Apr 2006 00:47:56 +0200, "Michael Fällgreen" <m**@ulle.se> wrote: >How can you use a like-search in a SP > >ALTER PROCEDURE dbo.spSearch > ( > @s varchar(50) > ) >AS > SET NOCOUNT ON > SELECT * FROM tbl where name LIKE @s > >What is I need to do a '%@s%' ?? > >Thanks >
Right way to do a insert
Stumped on an Update Query How to best handle multiple parameters? BULK INSERT permissions for non-admin? I am getting an error in creating a simple store procedure! GROUPING problem SQL2005 and 4GB of RAM : How do I use it? Top 5 Quesiton Quick Stupid Question, One to One Relationship Storage Login failed State 16 SQLServer 2005 |
|||||||||||||||||||||||