Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
display FinalResult column 2 times with different name and
krunal pande
Nov 21 2017 1:28 AM
130
Reply
Hi team,
i have one table with field .
empcode varchar(100),
FinalResult varchar(100),
date datetime
i want result like
display FinalResult column 2 times with different name and different where condition in single select statement
I used below query it gives present count right but wrong absent day count
select empcode,count(finalresult),(select count(finalresult) from elcm_mahsqa.tna.rostering where date between '2016-06-01' and '2016-06-15' and finalresult='a' ) as 'fg' from elcm_mahsqa.tna.rostering where date between '2016-06-01' and '2016-06-15' and finalresult='p' group by empcode.
please suggest any solution.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Subtract Qty from 2 tables in Sql
sql server login problem