I'd like to know what is the best way to select a limited top 'n' of rows from a specific column of a geodatabase file. Currently I use a function in the query builder of the select tool (arcgis10) in model builder which look a lot like the one posted on another item on this site (Select top 5 most items in a geodatabase). It looks like this in the expression of the query builder:
[Join_Count] in(SELECT TOP 9 [Join_Count] FROM spatial_join_geodat ORDER BY [Join_Count] DESC)
With this function I am able get a top n, but if the 9,10,11,12..... rows have the same value also these rows are selected. And sometimes the 9th row has a 0 as value and then all the rows are selected which I don't want. So, how do I limit the number of rows to 9 if this is the case?
Has anyone a solution for this?