A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [select-by-attribute]

To select data records according to logical criteria applied to their field values ("attributes")

Filter by
Sorted by
Tagged with
1
vote
0answers
36 views

Model Builder - Selections Add Up at the End

I am creating a model so that I can help colleagues visualize the workflow I used on a problem. My task was find all manholes in a specific area that connect to pipes >= 36". Simple enough, I did ...
3
votes
1answer
428 views

arcpy.SelectLayerByAttribute_management fails on Feature Class

I'm trying to streamline contour production with a script tool. Typically we make the contours to bring into AutoCAD Map where we need the "Elevation" and "Layer" fields populated so they import ...
3
votes
2answers
455 views

SQL Condition Statement in Select By Attributes query

I am attempting to execute a Select query in Select By Attributes where the return record set I'm looking for includes all records where the String value is greater than 7 characters long. For ex., I ...
3
votes
1answer
77 views

Select By attribute - top 100 values for each district

I am trying to determine the highest 100 values for each district in a shapefile. I have 27 unique districts and 62834 records, but not sure how to proceed. I could "split by attribute" based on the ...
1
vote
1answer
53 views

Using less parameters for Python script tool?

I am looking to create a user-input script for finding surrounding features of a given point. However, the parameters for it are very sensitive and I would like for it not to have to be such a process ...
-1
votes
1answer
54 views

Select analysis tool is creating an empty feature class in an arcpy stand alone script [closed]

I'm using select analysis to find a specific value. My program is working and I'm not getting any errors. However, the feature class that the program is creating is empty. I've double checked to make ...
1
vote
1answer
96 views

How to select cells with text?

I have point layer with text field. There is many empty field. I want to select only filled text. Something like this, with QGIS:
0
votes
0answers
38 views

Can arcpy let the user enter a query expression for select layer by attribute?

I have written something like this: inFc = sys.argv[1] FLayer = sys.argv[2] FValue = sys.argv[3] arcpy.MakeFeatureLayer_management(inFc, FLayer) #feature layer created arcpy....
1
vote
2answers
120 views

Create and populate field with name of feature (Select by Location) ArcPy

I am staring at 5600 individual points and 60 polygons. I need to create a new field in the point fc called 'Basin Name' and populate the field with the name of the Basin that it lies in. I am trying ...
12
votes
1answer
288 views

Turning off all pulsing-heartbeat and other animated effects in ArcGIS Pro?

Every time I select a feature or edit or split a feature the selection, appears to slowly pulse which is a new visual effect in Pro. The pulse effect takes way too long bordering on annoying which ...
3
votes
1answer
435 views

Slider for non time attributes in QGIS

How to filter data on attributes with a slider? By example, i would like to filter weights (CHARGE in my layer) attribute for polygons without to change the filter formula. The feature is available ...
2
votes
4answers
1k views

Creating queries to select by attribute with arcpy

I'm quite new with arcpy and I'm finding selecting by attribute a bit of a nightmare. There's a problem with my query on the script below [query = "\'Location\' = observer"], but I can't tell what it ...
1
vote
0answers
71 views

Selecting multiple attributes [closed]

I have a MS excel table with several thousand numbers that I need to select out of a single shapefile field with 20,000 numbers. How do I build a sql statement in select by attributes to do this?
4
votes
1answer
199 views

Selecting the largest from sets of duplicates in QGIS

I have a poly line layer where each feature has a Geometric Length and numerical ID. Some of these IDs are duplicates. I would like to be able to select the longest line from each set of duplicates to ...
0
votes
1answer
97 views

Select Layer Attribute Management -SQL Query [closed]

I am trying to make a layer from schools that depicts schools at greater than 700 meters. There is an attribute field "ELEV_METER" that has the numeric value for elevation. The query keeps being ...
2
votes
1answer
129 views

Writing python script to select attributes not in growing table with over 4000 values?

I am trying to write a Python script that will automate the process of comparing files within a directory to the id of a feature class, and then create (or refresh) a layer with only the features that ...
0
votes
1answer
179 views

Using Select by Attribute expression in ArcPy?

I have tried multiple ways to create an expression for use in the Select by Attribute tool, however it does not work past OID 3. For some reason, all the expressions work for OID 1 and OID 2, however ...
3
votes
2answers
290 views

Select rows where column values don't match the domain

In ArcGIS Desktop, I can use the Validate Features option in the Editor Toolbar menu to validate feature class columns against their respective domains. More info here in the Validating Features ...
1
vote
2answers
76 views

Select feature if field value in another field

I'm working with a feature class in ArcMap. I want to select features if the text of one field is found in another field. I have two fields, StreetName and StreetName_1. If StreetName == 'MAIN' and ...
1
vote
1answer
138 views

copy value if an attribute comparison match with another layers attribute is found in PyQGIS

Unfortunately, the two layers don't cover the same size of area and therefore don't have the same number of attributes. That's the reason I only saw the following attempt, instead of simply zip them. ...
0
votes
1answer
165 views

Select by Attribute on a changing date

I want to be able to select by attributes for dates that change weekly. I have gotten an invalid expression error for the follow script where the date needs to change to the current date and the same ...
2
votes
2answers
383 views

Selecting attributes which have comma delimiter

I'm currently working on a large dataset of roads. In which i have to check if the roads in 1:250 000 have the same road number as those in 1:50 000. Because of alot of generalization I have to make a ...
1
vote
1answer
162 views

Select Lowest Values using Arcpy?

I have a table (Feature class in FGDB) with 2 columns, one is the "name" and the other is a list of year values as text "Value1". How do I obtain the lowest 5 values for EACH name? I am trying to ...
1
vote
1answer
1k views

Select by attribute using modulo operation?

In ArcMap 10.5, I want to select the rows where the modulus of the objectid by 3 equals 1. How to write a SQL sentence in select by attribute window? My current query statement is something like ...
1
vote
1answer
121 views

Coding Select Polygon and Make New Layer

I have a large grid file, and I am looking to extract each individual polygon that makes up the grid into a new layer. Essentially, I would like to replicate selecting a layer by mouse click, then "...
1
vote
1answer
339 views

Find records with highest value based on unique ID

I'm trying to find a way to return all records that have the highest value in a field for each set of unique IDs. The attached table shows what I'm trying to achieve. The highlighted records would be ...
2
votes
1answer
218 views

Searching by attribute for special characters (*, ", ')

I am working with an attribute table that uses single, double, and triple asterisks to designate Wild and Scenic Rivers.I would like to Select by Attribute to filter the records that contain asterisks-...
0
votes
1answer
82 views

Using arcpy.selectlayerbyattribute_management, getparameter?

I am very new to scripting with ArcMap and I have been doing fairly well with google and youtube... but I've reached a problem. I am trying to run a script in which country(ies) I specify from a ...
3
votes
1answer
878 views

How to loop a process in ModelBuilder?

I'm trying to count how many star points there are in 500 meters radius around each property in the month of its transaction. I created buffers around each property transaction firstly. Since each ...
1
vote
1answer
236 views

QGIS object selecting if any segment length is longer than [closed]

I have a polygon layer with generated triangles covering for example district or city area. I need to select all the triangles if any triangle (object) segment is longer than 100 meters. Picture: ...
2
votes
1answer
272 views

Using a variable inside a where clause

I am trying to loop through a list of states, and use each state as a variable within a where clause to select by attribute. Below is the code I am trying to run. Note: I will eventually be running ...
1
vote
0answers
59 views

Error 00358 when using arcpy.SelectLayerByAttributeManagement [duplicate]

All I'm trying to do is use SelectLayerByAttribute to select all lines less than 5.1 meters. However, no matter what query I try I keep getting "error 000358 invalid expression" when I run the script ...
0
votes
0answers
85 views

Formating a query in ArcPy- why the error?

I have the following Select Layer By Attribute statement throwing a 000358 invalid expression error using Python with ArcGIS 10.4. The input feature layer is valid because I can select features using ...
0
votes
2answers
1k views

Select features with same value in a given column

I first tried writing this post in generalities but realized it was more confusing that just giving the long version, so here goes. I have a tree inventory that has property quads (in front of a ...
2
votes
1answer
87 views

Filtering a layer by an extracted feature?

I am currently getting quite frustrated writing the base of a longer script. What I would like to do currently is to extract an attribute from one layer and select rows in another layer based on an ...
-1
votes
1answer
188 views

Select by Attribute Sum Fields [closed]

Is it possible to sum fields together in the select by attribute tool with a SQL query? I'm working in ArcMap 10.3.
1
vote
1answer
73 views

Selecting only attributes specified using ArcPy?

This is a working code made using exporting the script from ModelBuilder. import arcpy # Local variables: Links_Final = "Links_Final" condition = "\"RR1\"= 777 OR \"RR2\"=777 OR \"RR3\"=777 OR \"RR4\...
1
vote
2answers
115 views

arcpy.Select_management invalid sql expression - VDI

I am using ArcMap 10.2.2 and trying to make separate feature classes from a larger feature class using a field delimiter and SQL statement but am getting an error that the SQL statement is invalid. ...
0
votes
1answer
2k views

Selecting blank values within a table

I am selecting the following to remove NULL values from a selection, but unable to remove BLANK values from the selection. Would selecting BLANK values only be done by using a string length of 0? I ...
0
votes
2answers
68 views

What's wrong with my expression?

I'm trying to have a user input a county in my tool, and then use that string to select from a layer of counties. County = arcpy.GetParameterAsText(0) #Select county to clip arcpy....
0
votes
1answer
76 views

Selecting specific counties using selectlayerbyattribute in arcpy

I have a shapefile for counties containing many fields, among which Pop_Descrp is one. I need to select the counties with Highly Increased attribute under the field and export it. I am not able to ...
2
votes
1answer
79 views

Can you use LEN in SelectLayerByAttribute_managment in Arcpy?

I am trying to use LEN to select all strings in a Column that are a length of a phone number, and am unable to enter the correct expression, is it possible to use LEN in ...
1
vote
0answers
682 views

Select by Attributes iteration in ArcGIS ModelBuilder?

Trying to select all points by location that fall within a polygon select by attribute from the selected by location using an expression. so far it works fine .. I have a list of values - I need ...
0
votes
1answer
503 views

Using list of numbers to Select By Attribute in ArcPy?

I am trying to use Python to select all records whose attribute (which is a number) in a certain field is within a list. I cannot get the syntax correct. my list is: upstream = [9841978, 9842008, ...
2
votes
0answers
92 views

When selecting by attribute, unique values display only dots (…) [closed]

I'm using ArcMap 10.3. I haven't found any information as to why this may be an issue or the cause. Does anyone know why dots show up in the unique value box when I have values in the field in the ...
2
votes
1answer
983 views

Selecting largest polygon in QGIS

I would like to select the largest number in a column of an attribute table by "select by attributes" in QGIS to select the polygon with the largest area. How would be the expression for that? I do ...
3
votes
1answer
250 views

QGIS create selection script

I am trying to create my first script in QGIS. ##Double attribute selection=name ##Vector=group ##Selection_layer=vector ##First_field=field Selection_layer ##expression=string ##Second_field=field ...
3
votes
1answer
169 views

Selecting new records using values inside previous selected rows in QGIS?

I am trying to create a selection. First, I select records which have Null value in "Status" column ("Status" is NULL"). Then it starts to be a bit tricky. I want to select all the records which have ...
1
vote
1answer
278 views

Using QGIS how to extract single polygon co-ordinates in multiple polygon data?

I have polygon coordinates for complete India at district level and I want to just use 2 or 3 districts out of complete polygon. For example : I want to just select district Pune and Nasik and need ...
1
vote
4answers
397 views

Unsupported Operand Type for Field Query

Following on from Correct SQL expression for SelectbyAttribute Tool, I have my code: import arcpy plantFile = r"U:\Users\K\Plants.shp" field = "UID" arcpy.MakeFeatureLayer_management (plantFile, "...