Sample data :
Ebase table : ebid,firstname,lastname, adress,ect..
Employee table:eeideb(foreign key) ,datebeg,dateend,status
when an employee is active, dateend is null
and status ='active'
the query will be run yearly from
Jan. - Dec.
is it clearer for you now?
i have a situation where i must count the number of month an employee is active in a year :
Example 1: from Jan to May Active, June to July on leave, August to Sept
Active, so 7 months
Example 2: from Jan to May Active, from June to Sept Terminated..so 5
Months
or the employee can be active...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.