TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
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....
Reply
Answers (
1
)
Quoted_ident0ifier on SQL
For loop in Sql Server