The store procedure error

Posted by Rajamani under Sql Server on 9/29/2012 | Points: 10 | Views : 684 | Status : [Member] | Replies : 2
hai friends this is my query
alter proc [dbo].[sp_searchs] 
(
@param_strname varchar(30),
@count varchar(50) output,
@key varchar(50)output
)
as
declare @cot varchar(50)
declare @value varchar(50)
begin
set nocount off
set @cot= (select count(papername) as cnt from PapersDetails Where papername like '%' + @param_strname + '%')
if(@cot>0)
begin
set @value=(select distinct(Keywords) from keywordsDetails where Keywords like '%' + @param_strname + '%')

end
exec sp_searchs @param_strname,@count= @cot OUTPUT,@key=@value output

end

it will show the error of Procedure or function 'sp_searchs' expects parameter '@count', which was not supplied.. so it will be get the return value in sql server




Responses

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
output parameter did not passing so

try this

exec sp_searchs 'dd',0,0


which value return ur output parameter i will change and send you


Mark as Answer if its helpful to you

Rajamani, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you

Rajamani, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response