1
Answer

display userdetail in gridview& totalcount in dashboard /Lbl

Ask a question
ALTER PROCEDURE [dbo].[pDashboard]

AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @TotalUSers INT
DECLARE @PendingQuery INT
DECLARE @RepliedQuery INT


SELECT @TotalUSers = COUNT(*)
FROM register


SELECT @PendingQuery = COUNT(*)
FROM USerQuery
WHERE QueryReply is null

SELECT @RepliedQuery = COUNT(*)
FROM UserQuery
WHERE QueryReply is not null


SELECT @TotalUSers as TOTALUSERS,
@PendingQuery as PENDINGQUERY,
@RepliedQuery as RepliedQuery

END

Answers (1)