dipti kate

dipti kate

  • NA
  • 23
  • 11.7k

bind grid view using stored procedure with two queries.

Dec 2 2015 12:49 AM
I want to bind one grid view with two queries using stored procedure. for that i was written stored procedure like below:
 CREATE  PROCEDURE [dbo].[UserWorkDetails]
AS
BEGIN
select a1.projectName,COUNT(distinct s.SrNo)as total_count from ADDPROJECTNAMETOCRMSYSTEM a1
inner join savetodb as s
on a1.projectid=s.Projectid
inner join AssignprojectToMemberwithDetailInstruction as a2
on a2.Projectid=s.Projectid
where a2.MemberId=3
and a2.RowFNoTo<>'' and a2.RowFNorom<> ''
and s.SrNo between a2.RowFNorom and a2.RowFNoTo
group by a1.projectName
select COUNT(distinct SrNo)as Work_count from savetodb where MemberId=3
and FirstName<>'NA' and FirstName<>''
group by Projectid
End
 my gridview colums like

Project Name

Total Count

Work Count

 plz solve that problem as soon as possible

Answers (1)