when i execute this code
alter proc sp_pub
(
@param_category_name varchar(20)
)
as
begin
declare @c_id int
declare @p_id int
set @c_id=(select Cat_ID from BookCategory where Category=@param_category_name )
set @p_id=(select distinct(pub_ID) from NewBook where Cat_ID=@c_id)
select PublisherName from Publisher where pub_ID=@p_id
end
select distinct(pub_ID) from NewBook where Cat_ID=@c_id output
1
2
3
4
5 i get following error
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. how to solve this error any one help me
gowthaman8870226416