Education & Training
Services & Support
to create and rate content, and to follow, bookmark, and share content with other members.
Resources who have ever submitted a timesheet- Query
Question asked by
on Dec 18, 2009
on Dec 18, 2009 by sundar
Show 1 Like
Hi, Is there a query which would let me know whether an user had ever submitted a timesheet. Like I need a list of all user who have ever submitted a timesheet. ThankK
No one else has this question
Mark as assumed answered
This content has been marked as final.
Show 3 comments
(Required, will not be published)
Dec 18, 2009 3:20 PM
SELECT *FROM SRM_RESOURCESWHERE ID IN ( SELECT PRRESOURCEID FROM PRTIMESHEET ); -- will tell you resources who had ever created a timesheet... SELECT *FROM SRM_RESOURCESWHERE ID IN ( SELECT PRRESOURCEID FROM PRTIMESHEET WHERE PRSTATUS = 4); -- will tell you resources who had ever created a timesheet that had been posted (etc) Dave.
Show 1 Like
Dec 21, 2009 4:31 AM
Actually thinking about it a bit - what I have suggested tells you RESOURCES that have ever has a timesheet submitted for them.... ...but re-reading your original post; you could mean USERS who have ever submitted timesheets (for any RESOURCE (not neccessaily their own timesheet))? If the latter is what you really meant, then this would find that sort of thing; SELECT * FROM CMN_SEC_USERSWHERE ID in(SELECT PRSUBMITTEDBY FROM PRTIMESHEET); (I think that association is right, I'm not in front of a database at the moment - it might be SRM_RESOURCES.ID that is assocated to PRSUBMITTEDBY) EDIT: Just looking in the manual I was right first time! PRSUBMITTEDBY does equal CMN_SEC_USERS.ID - should never have doubted myself :-) ) Message Edited by Dave on 21-12-2009 09:31 AM [left]
Show 0 Likes
Dec 18, 2009 11:18 PM
Hi, -- if you are looking for resources who had not submitted the timesheets ever, just add not in at dave's query. SELECT * FROM CMN_SEC_USERSWHERE ID not in(SELECT PRSUBMITTEDBY FROM PRTIMESHEET); cheers,sundar
Show 1 Like
Retrieving data ...
[COMMUNITY WEBCAST] - OAuth integration with IFTTT - June 19, 2018 @ 12 p.m. ET
MAY18 Published Tecdocs / Tech tips / Posts to Spectrum Community board
Show details for unresolved connections
JAVA Dynamic combo box