Thread

Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > Reporting querry - Select...

Reporting querry - Select incidents by user's department RSS Feed

Thursday, September 19, 2013

Hi,

I'm trying to build a querry which will extract all incidents for a project which were raised by members of the same department.

I was able to create some of the pieces of the querry (see below) but I am not able to put them together into a single querry so that I get the report I'm after. Anyone able to provide some help with this?

select value R from SpiraTestEntities.R_Incidents as R where R.PROJECT_ID = ${ProjectId}
select value R from SpiraTestEntities.R_Incidents as R where R.OWNER_ID = 'Tom'
select R.USER_ID from SpiraTestEntities.R_Users as R where R.DEPARTMENT= 'ICT'

I am able to select the incidents by user and the users which are part of the ICT department, however I don't know how to combine it all together.

Thanks for any help.

2 Replies
Adam SAdam S
re: Thomas Toth on Thursday, September 19, 2013
Tuesday, September 24, 2013

Hi Thomas

Something like:

select value R from SpiraTestEntities.R_Incidents as R where R.PROJECT_ID = ${ProjectId} and R.OWNER_ID = 'Tom' and R.DEPARTMENT = 'ICT'

Regards

Adam

Thomas TothThomas Toth
re: Adam S on Tuesday, September 24, 2013
Thursday, October 3, 2013

Sorry for the late feedback, I only saw your reply today.

Unfortunately that doesn't work as R_Incidents doesn't have R.REPARTMENT in it. I need to find a way to join the two tables based on the user_id.

I get the error message 'DEPARTMENT' is not a member of type 'Inflectra.SpiraTest.DataModel.R_Incident' in the currently loaded schemas. Near simple identifier, line 1, column 86'.

 

Tagged
Statistics
  • Started: 9/19/2013
  • Last Reply: 10/3/2013
  • Replies: 2
  • Views: 540
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.