not add domain!
SQL Query to grab Timesheet data from RDB, including Project and Task Name. - Integent
Call Us Today! 1.800.895.3254
sales@integent.com
Consulting & Advisory
Consulting / Advisory helps business and IT leaders make better decisions and turn strategy into execution-ready initiatives. Most engagements start with a Discovery Initiative to confirm outcomes, and build a roadmap.
Learn About Consulting
Data & AI
Data & AI delivers modern data platforms, analytics, and practical AI assistants built on enterprise-grade cloud tools. Integent helps you govern, deploy, and drive adoption so solutions stick and scale across your organization.
Learn About Data & AI
Support
Support keeps your solution stable, secure, and aligned with day-to-day operations. We combine functional and technical expertise with proactive monitoring, preventive maintenance, and 24/7 coverage for critical incidents.
Learn About Support
Microsoft Planner Premium
Leverage proven knowledge and experience to design and deploy Microsoft Planner Premium so your organization can manage projects, work, and resources more effectively across teams.
Learn More About Planner Premium
OnePlan
Integent can help you ensure continuity beyond Project Online by deploying OnePlan in the Microsoft Cloud—connecting portfolio governance, resources, and delivery execution for results.
Learn More About OnePlan
Microsoft Dynamics 365
Ensure business continuity with a custom cloud solution that connects your sales, service, finance, and operations teams to deliver measurable, predictable results.

Learn More About Dynamics 365
Microsoft Power Platform
Consisting of Power BI, Power Apps, Power Automate and Copilot Studio, the Microsoft Power Platform helps streamline and improve business functions.

Learn More About Power Platform
About Integent
Integent was founded in 2009 on the principles of building long-lasting relationships with customers, exceeding expectations, and providing outstanding customer service. 

We’re dedicated to providing a customized solution backed by our knowledgeable team of Microsoft experts.
Discover What Makes Us Different
News
Stay informed on Integent’s latest company updates and other important industry information. Our passion is customer success.
Read The Latest News
Videos
Learning new software doesn’t have to be difficult with our library of dozens of free training videos. Our video training always has something new.
Browse Our Training Video Library
Blog
Our industry experts share best practices and common pitfalls to avoid, in order to get the most out of your technology solutions.
Discover More

July 9, 2011

SQL Query to grab Timesheet data from RDB, including Project and Task Name.

This is a good query if you want all timesheet actuals, including those that may not have been updated via a republish of a project.

 

SELECT    TSR.ResourceName,
        TSC.ClassName 'Project Classifications',
        TSA.ActualWorkBillable 'AssignmentActualWork' ,
        TSA.TimeByDay,
        TSC.Type,
        mtt.TaskName,
        ISNULL(MTP.ProjectName, TSC.ClassName) 'ProjectName'
FROM dbo.MSP_TimesheetActual AS TSA -- Stores planned & actual work per day
INNER JOIN dbo.MSP_TimesheetLine AS TSL
ON TSA.TimesheetLineUID = TSL.TimesheetLineUID -- Tells us what line type the actual belongs to
INNER JOIN dbo.MSP_TimesheetClass AS TSC
ON TSL.ClassUID = TSC.ClassUID -- Tells us all the line types
INNER JOIN dbo.MSP_Timesheet AS TS
ON TS.TimesheetUID = TSL.TimesheetUID -- Tells us who's timesheet the line belongs to
INNER JOIN dbo.MSP_TimesheetResource AS TSR
ON TS.OwnerResourceNameUID = TSR.ResourceNameUID -- tells us the TS resource name when the TS was submitted
INNER JOIN dbo.MSP_EpmResource_UserView mer
ON mer.ResourceUID = TSR.ResourceUID
INNER JOIN MSP_TimesheetTask mtt
on mtt.TaskNameUID = TSL.TaskNameUID
INNER JOIN MSP_TimesheetProject MTP
ON MTP.ProjectNameUID = TSL.ProjectNameUID
LEFT OUTER JOIN MSP_EpmProject_UserView MEP
ON MEP.pROJECTuid = MTP.ProjectUID
--Where tsa.TimeByDay between @StartDate and @EndDate
--and TSA.ActualWorkBillable <> 0.00

© Copyright 2026 | Integent.com | All Rights Reserved
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram