Click here to Skip to main content
15,890,897 members

Comments by touseef4pk (Top 57 by date)

touseef4pk 19-Apr-16 11:43am View    
Chaa gay hen ap. Means you are great. Thanks for help.
touseef4pk 18-Jan-16 8:36am View    
Fiscal year means current financial year Yes we can derive it from RequestedOn like year(dateadd(M,-6,RequestedOn))
touseef4pk 18-Jan-16 8:30am View    
How can I show column of fiscal year along with the resultset so that each result should show data in each fiscal year?
touseef4pk 18-Jan-16 8:21am View    
Thanks. This is exactly what I require.
touseef4pk 18-Jan-16 6:57am View    
SELECT e.EmployeeId, e.FullName,ap.RequestedOn from Employee e join AdvancePayment ap on e.EmployeeId = ap.EmployeeId
WHERE ap.EmployeeID IN
(SELECT EmployeeId FROM AdvancePayment
GROUP BY EmployeeID HAVING COUNT (year(dateadd(M,-6,RequestedOn))) > 1)

This gives me records of all the employees who has taken advance twice in a fiscal year. But i am unable to get that how can I get records with following output
empId, Name, 1st advance date, 2nd advance date.