2

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"
3
  • 1
    A related post may be of help: gis.stackexchange.com/q/24163/8104
    – Aaron
    Jul 3, 2013 at 19:34
  • 2
    What type of table (file, arcsde, dBase, personal) are you using?
    – PolyGeo
    Jul 3, 2013 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, 2013 at 15:40

1 Answer 1

2

"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

3
  • 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, 2013 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, 2013 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, 2013 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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