Bindu

Bindu

  • NA
  • 40
  • 63.8k

multiple select statements

Nov 5 2012 7:13 AM
Hi...
 

my stored procedure is
 

select count(TaskId) as tasks from Task T,Provider P  where P.UserId=T.UserId  and T.permissions='False' and T.State='Close' and T.Assignedto=@Assignedto
 

select count(TaskId) as tasks1 from Task T,Provider P where P.UserId=T.UserId  and T.Permissions='False' and T.State='Open' and T.Assignedto=@Assignedto
  
select count(TaskId) as tasks2 from Task T,Provider P where P.UserId=T.UserId  and T.Permissions='False' and T.State='Completed' and T.Assignedto=@Assignedto


it is working in sql. but when i am using it in services i am getting only tasks value.i can't get tasks1 and tasks2. where i am going i cant under stand. is there another way to write this stored procedure.
 
thanks in advance....

Answers (1)