sp | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sp

Hi all [<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br />I have a table called books.<br /><br />The columns are bookid,bookname.<br /><br />I want to write a stored procedure.<br /><br />The parameter is @partname.<br /><br />for example if give @partname = ‘ram'<br />then all books which are related to ‘ram’ should display<br /><br />like <br />bookname<br />———–<br />The Ramaian<br />Ramaian by molla<br />Ram Ram Ram<br />The Ramayanam by valmiki<br /><br /><br />Thanks.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
create procedure ProcName
@partname Varchar(100)
as
select bookid, bookname
from books where bookname like ‘%’[email protected] +’%’ MohammedU.
Microsoft SQL Server MVP
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

]]>