Hi,
What you need to do is:
alter proc [dbo].[UDSP_GetPivotTable_Tmf_New_WithAllClients]
(
@ClientID int
)
as
DECLARE @VISIT INT
DECLARE @PTP INT
SELECT @VISIT=SELECT COUNT(*) FROM tbl_MainList WHERE Code = 'Visit' and ClientID=@ClientID
SELECT @PTP = SELECT COUNT(*) FROM tbl_MainList WHERE Code= 'Ptp' and ClientID=@ClientID
SELECT @VISIT AS VISIT, @PTP AS PTP