多个选择语句

扫码查看
本文介绍了多个选择语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...


我的存储过程是

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




它在SQL中工作.但是当我在服务中使用它时,我仅获得任务价值.我无法获得任务1和任务2.我要去的地方我不能站立.还有另一种写此存储过程的方法.

在此先感谢....




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....

推荐答案


这篇关于多个选择语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 20:44
查看更多