I am working with a postcode shapefile which has over 8000 attributes and wish to search for particular attributes without having to scroll through thousands of others, is there a way of searching and selecting particular attributes?

  • 5
    Do you mean you mean you have 8000 columns or 8000 rows (features)? – Kirk Kuykendall Jul 13 '11 at 16:13
  • The maximum number of fields (columns) in a shapefile DBF is 255 – Mike T Jul 13 '11 at 20:48
  • The Geodatabase Diagrammer at arcscripts.esri.com/details.asp?dbid=15166 is useful for analysing the schema of databases. It may require that you convert your shapefile to a geodatabase first – Stephen Lead Jul 14 '11 at 1:21

Use the Select by Attributes tool (Select menu -> Select by attributes). Then Select the attribute you want to search by, the operator (=, <, >, etc), and the attribute you want to search for to build your query. It can either create new selections or add to existing selections.

Once you've selected the required features, you can do Select menu -> Zoom to selected. Or you can open the attribute table (right click the layer in the TOC and choose Open Attribute table), and then change the display to Selected features only. That will display just the features that were selected.

  • 1
    So that future readers will understand this answer correctly, I want to raise a point for clarification. You might be right in your re-interpretation of the question as one about searching for records, but in its current form it clearly asks to search for attributes (fields). For instance, some third-party Census databases can have thousands of related fields, each with cryptic names. How exactly would you go about finding the field containing the count of households with annual incomes between $30K and $40K, for instance? I think that may be what is being asked. – whuber Jul 13 '11 at 14:47
  • 2
    Yes, you may be right. I think clarification is definitely needed on the original question. – Sasa Ivetic Jul 13 '11 at 15:06
  • 1
    also, if you plan to do lots of searching and/or joining to other tables, be sure to add an attribute index to speed the query up – Mike T Jul 14 '11 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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