In SQL Sever, I run a stored procedure like this:
begin
declare @account_id int = 98
declare @transaction_id int = 2877
declare @transaction_type_id int = null
exec sp_sample
@account_id,
@transaction_id,
@transaction_type_id
end
and it returns a result like this:
How can I get two anonymous values above and assign them to two variables for the next calculation?
My stored procedure definition:
create procedure sp_sample
(@account_id integer,
@transaction_id integer,
@transaction_type_id integer)
/*with encryption*/
as
declare @pricing_method char(1),
@pricing_status char(1)
begin
set nocount on
execute sp_out_pricing_details
@account_id,
@transaction_id,
@transaction_type_id,
@pricing_method output,
@pricing_status output
select @pricing_method, @pricing_status
end