andrewhthomas
9/14/2012 - 2:10 PM

SPS time and task query

SPS time and task query

Select
  projects.project_code,
  tasklists.name,
  users.username,
  timelogs.date,
  timelogs.time
From
  timelogs Inner Join
  tasks On timelogs.task_id = tasks.id Inner Join
  projects On tasks.project_id = projects.id Inner Join
  tasklists On tasks.tasklist_id = tasklists.id Inner Join
  users On users.id = timelogs.user_id
Where
  projects.client_id = ## And
  timelogs.user_id = ##
Order By
  timelogs.date Desc