Friday, 7 February 2020

How to add multiple Store procedure in one query

ANS:-

Cerate procedure AllGrossProfit
alter procedure AllGrossProfit
as
begin

create table #tblGrossProfit (
    Formula nvarchar(100),
    Numerator19_20 numeric(19,6),
    Denominator19_20 numeric(19,6),
    RatioPC19_20 numeric(19,6),
    Numerator18_19 numeric(19,6),
    Denominator18_19 numeric(19,6),
    RatioPC18_19 numeric(19,6)
)
insert into #tblGrossProfit exec Netprofitmargin
insert into #tblGrossProfit exec financedashboard6
insert into #tblGrossProfit exec financedashboard4
insert into #tblGrossProfit exec grossprofitratio
insert into #tblGrossProfit exec financedashboard5
insert into #tblGrossProfit exec InventoryTurnoverRatio
insert into #tblGrossProfit exec financedashboard

select * from #tblGrossProfit

drop table #tblGrossProfit
end

exec AllGrossProfit

No comments :

Post a Comment