Analog for window function in Entity SQL

Wednesday, June 5, 2019
Avatar

Hello,

I'm working with SpiraTestEntities.R_HistoryChangeSets table and would like to output only latest hisoryChange record for each requirement/test set.

I was trying to find information about how to use window function with Entity SQl but have found nothing. Looks like it is not supported.

 Is there any workaround in Spira to use window functions such as ROW_NUMBER() or DENSE_RANK()?

 

Best Regards,

Andrii

1 Replies
Friday, June 7, 2019
Avatar
inflectra.jimx
re: AndriiB Wednesday, June 5, 2019

Hello,

That is a good question, please use TOP(x) like this:

select value top (2) R from SpiraTestEntities.R_Incidents as R where R.PROJECT_ID = ${ProjectId}

OR with specific column names:

select top (2) R.INCIDENT_ID, R.NAME from SpiraTestEntities.R_Incidents as R where R.PROJECT_ID = ${ProjectId}

Regards

Jim

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, June 5, 2019
  • Last Reply: Friday, June 7, 2019
  • Replies: 1
  • Views: 1278