I am getting the following error when i trying to create the store procedure
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. create proc GetDiscountforClient
(
@ClientId int
)
as
begin
declare @RowTransactionCount int;
declare @DiscountValue decimal(18,2);
set @RowTransactionCount = (Select Count(ClientId) from TransactionDetail where
ClientId = @ClientId)
if(@RowTransactionCount > 5)
begin
set @DiscountValue = (select DV.ActualValue,DV.DiscountId,DM.DiscountType
from DiscountValue DV
inner join DiscountMaster DM
on
DV.DiscountId = DM.DiscountId
where DV.DiscountId = 1)
end
select @DiscountValue 'DiscountValue'
end
Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved