hi ,
i have one problem with this query please help me. if iam using having cluase iam not getting records . if iam run from select to group by iam getting results . please help me how to use this query with having clause
SELECT
CONCAT(s.Skill,'(',es.Experience,' Months',')')AS Skills
FROM projectemployee p
LEFT OUTER JOIN employeeskills es ON p.EmployeeId =es.EmployeeId
LEFT OUTER JOIN skilllookup s ON es.Skill =s.SkillId
WHERE CURDATE() BETWEEN p.StartDate AND p.EndDate
GROUP BY p.EmployeeId
HAVING SUM(p.AllocationPercentage) < 100;
CONCAT(s.Skill,'(',es.Experience,' Months',')')AS Skills
FROM projectemployee p
LEFT OUTER JOIN employeeskills es ON p.EmployeeId =es.EmployeeId
LEFT OUTER JOIN skilllookup s ON es.Skill =s.SkillId
WHERE CURDATE() BETWEEN p.StartDate AND p.EndDate
GROUP BY p.EmployeeId
HAVING SUM(p.AllocationPercentage) < 100;
Jignesh TrivediPosted Nov 6, 2015, 12:57 AM
Hi,
Please verify the data in SUM(p.AllocationPercentage) column, using query which have provided. any record has SUM(p.AllocationPercentage) column less than 100?
padmapriya patruniPosted Nov 6, 2015, 12:26 AM
Jignesh TrivediPosted Nov 6, 2015, 12:13 AM