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 |
madhan
Yak Posting Veteran
59 Posts |
Posted - 2014-09-18 : 14:06:56
|
Hi - Stored procedure displays the follwing error.Procedure or function 'getFavoriteList' expects parameter '@category_name', which was not supplied.I have codeSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[getFavoriteList] @customer_id int, @category_name varchar(200) OUTPUT as begin SET NOCOUNT ON select @category_name= category_name from dbo.Favorite_listwhere customer_id=@customer_idend category_name is a coumn that is in Favorite_list table. Please help |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-09-18 : 14:11:48
|
Please post the code you are using to execute the stored procedure |
|
|
madhan
Yak Posting Veteran
59 Posts |
Posted - 2014-09-18 : 14:19:12
|
Thanks,execute getFavoriteList 87381I have given value for input parameter and trying to execute |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-09-18 : 14:34:34
|
You need to specify a variable for the OUT parameter, e.g.declare @catname int;execute getFavoriteList 87381, @category_name = @catname OUT; |
|
|
Upendra Gupta
Starting Member
12 Posts |
Posted - 2014-09-19 : 06:27:56
|
unspammed |
|
|
Lincolnburrows
Yak Posting Veteran
52 Posts |
Posted - 2014-09-20 : 06:28:02
|
Please show how you are executing this procedure. |
|
|
Lincolnburrows
Yak Posting Veteran
52 Posts |
Posted - 2014-09-20 : 07:08:24
|
quote: Originally posted by gbritton You need to specify a variable for the OUT parameter, e.g.declare @catname int;execute getFavoriteList 87381, @category_name = @catname OUT;
@category_name data type is varchar in OP question, you declare it as int |
|
|
|
|
|