How to track total hours of a day for an employee

M

Mohit Johri

Dear Sir/Madam,

I am programatically trying to fetch total hours of an employee for a
particular day from the project server database. The query which I am using
to do so is as follows:

SELECT SUM(w.WWORK_VALUE/1000/60) AS Hours FROM
projectserver.dbo.MSP_WEB_RESOURCES r,
projectserver.dbo.MSP_WEB_ASSIGNMENTS a,
projectserver.dbo.MSP_WEB_PROJECTS p,
projectserver.dbo.MSP_WEB_WORK w
WHERE w.WWORK_TYPE = 1 AND w.WASSN_ID = a.WASSN_ID AND a.WPROJ_ID =
p.WPROJ_ID AND a.WRES_ID = r.WRES_ID
AND r.WRES_NT_ACCOUNT=<<DomainName/userid>> AND w.WWORK_START='11/21/2006'
AND 1>0 GROUP BY r.res_name, w.wwork_start

The problem I am facing with the above query is in some cases its working
just fine and extracting the correct hours where as in other cases due to
some reason, some records are not reflecting as rows in the table
"projectserver.dbo.MSP_WEB_WORK" in turn, not extracting the correct
hours(extracting null ) for a day of that user.
Please guide, how can I extract the total hours entered by a user, for a day
without any assignment start day
 
G

Gary L. Chefetz [MVP]

Mohit:

You need to better understand how Project stores time data. Did you know
that when the user enters the same amount of work in two consecutive days,
that this gets stored as one entry? To better accomplish your goal you
should locate two files in the server help directory for your language:
svrdb.htm and prjdb.htm With these as your guide, you should be able to get
the query correct. Please post developer questions like this to
microsoft.public.project.developer in the future. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top