AnsweredAssumed Answered

subquery in personal geodatabase giving incorrect results

Question asked by insyzygy on May 6, 2015
Latest reply on May 14, 2015 by insyzygy

Hi,

 

I am having a strange problem with an SQL query that I have used successfully in the past, namely:

 

SELECT * FROM TABLE WHERE:

[ELEVATION] IN (SELECT MAX( [ELEVATION] ) FROM TABLE GROUP BY [GRID_BOX] )

 

(I have binned many mountain peaks into a grid using the INTERSECT TOOL to give the GRID_BOX field.)

 

I run the query without any errors but the results are not at all as expected.  Instead of returning a single point per grid square, 1 or more points are being selected.  I know the issues with subqueries but I have run this exact query on another dataset successfully but when running with this dataset it just doesn't work.  Are there any issues with FLOATs or INTs I need to be aware of?  I am at my wits end having spent many hours on this problem and I would be so grateful for any pointers.

 

I would like to upload the personal geodatabase somewhere but not sure how to do this?

 

Thanks.

Garret

Outcomes