Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > SpiraTeam Issues & Qu... > Reporting querry - Select...
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.
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
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'.
And if you have any questions, please email or call us at +1 (202) 558-6885