Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In ArcGIS 10.1 I am trying to do a Definition Query that will select the records that are the min values from a table.

I try a lot of type of query like and it still not working. Name table is Polygone_Buffer_Output Attribute : Air_Mil

"Air_Mil" = (SELECT MIN( "Air_Mil" ) FROM "Polygone_Buffer_Output"

[Air_Mil] = (SELECT MIN( [Air_Mil] ) FROM "Polygone_Buffer_Output"

[Air_Mil] = (SELECT MIN( [Air_Mil] ) FROM [Polygone_Buffer_Output]

"Air_Mil" in (SELECT MIN( "Air_Mil" ) FROM "Polygone_Buffer_Output"

Any ideas would be appreciated!

Merci

share|improve this question
1  
A related post may be of help: gis.stackexchange.com/q/24163/8104 –  Aaron Jul 3 '13 at 19:34
2  
What type of table (file, arcsde, dBase, personal) are you using? –  PolyGeo Jul 3 '13 at 20:49
    
It's with file i'm not able to run my query. But in personal GDB i can execute the query with the advice of CLJ –  user19717 Jul 30 '13 at 15:40
add comment

1 Answer 1

up vote 1 down vote accepted

"Air_Mil" in (SELECT MIN( "Air_Mil" ) FROM Polygone_Buffer_Output

or

[Air_Mil] in (SELECT MIN( [Air_Mil] ) FROM Polygone_Buffer_Output

using square brackets or quotes depends on your underlying database implementation.

http://resources.arcgis.com/en/help/main/10.1/index.html#//00s500000033000000

share|improve this answer
    
Thanks, it's run with GDB but when it's only a shapefile a didn't find the way to execute my query –  user19717 Jul 30 '13 at 15:42
    
Did you try both methods? What message did you get back from ArcGIS when you were trying to query shapefiles? –  CLJ Jul 30 '13 at 16:28
    
It's telling me "There was a problem selecting", "An invalid SQL statement was used." Yes i try both methods and many other. Have you already able to make a query of this kind on a shapefile outside of GDB ? –  user19717 Jul 31 '13 at 16:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.