Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Analog for window functio...
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
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
And if you have any questions, please email or call us at +1 (202) 558-6885