Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Create Procedure dbo.CallOtherProcedures
@Param1 int,
@Param2 VarChar(20)
As
SET NOCOUNT ON
Exec NameOfFirstStoredProcedure @Param1
Exec NameOfSecondProcedure @Param2
Exec NameOfLastProcedure
hi gmmastros
But i just want to make sure that, can i able to pass the input for one of the procedure?
Also one more thing i want to get it confirm that, the order we have placed the stored procedure, will the execution also takes place in the same order.
declare @SQL nvarchar(max), @Cols nvarchar(max)
set @Cols = stuff((select ', ' + quotename(YYYYMM)
from (select distinct YYYYMM from REAS_HPI_State_Final) X
order by YYYYMM for XML PATH('')),1,2,'')
set @SQL = 'select * from
(select state_code,YYYYMM,home_price_index from REAS_HPI_STATE_Final where tier_code in(0)
and state_code in('00','01')) src
PIVOT
( max(home_price_index) For YYYYMM IN( +@Cols +')) as Pvt'
execute (@SQL)
declare @SQL nvarchar(max), @Cols nvarchar(max)
set @Cols = stuff((select ', ' + quotename(Period_no)
from (select distinct Period_no from REAS_HPI_State_Final where Period_no>=193) X
order by Period_no desc for XML PATH('')),1,2,'')
set @SQL = 'Select DISTINCT R.STATE_NAME, pvt.* from
(select state_code,Period_no, HPI_12M_Change*100 as [Percents] from REAS_HPI_STATE_Final where tier_code in(0)
) src
PIVOT
( max([Percents]) For Period_no IN( '+@Cols +')) as Pvt
INNER JOIN REAS_STATE_BE r
ON pvt.STATE_CODE = R.STATE_Code'
execute (@SQL)