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
0
votes
1answer
22 views

Creating a layer with selected values (divided by commas) from another layer - query or model needed

I have a very large dataset in ArcMap 10.6 and I would like to create a subset that selects only rows that have specific attributes (some of them with special characters) from a field that in my case ...
0
votes
0answers
26 views

SelectLayerByAttribute_management not selecting anything

I've read through most of the other similar questions and nothing so far has addressed my issue; most are about syntax. I'm trying to select by attribute from a Feature Layer. But every time, Arc ...
1
vote
2answers
33 views

SelectLayerByAttribute_management selects all of type of attribute instead of specific one?

I want to create a tool that allows a user to select all the points within a specific zip code by inputting that zip code. The code below selects ALL of the points with a zip code - which is all of ...
0
votes
1answer
26 views

Selection of duplicate values of column and update of another column based of selection using ModelBuilder?

How to select a row in ModelBuilder if a number appears again in the column "MyName_C"? For the selected features the column "Ausrichtung" should be added with 180. I am working with ArcGIS ...
0
votes
1answer
11 views

Defining categories adds previously unselected attributes (ArcMap)

I am using ArcMap 10.5.1 and want to create a layer from a selection of another layer (Selection > Select by attributes..). This works fine and my new layer is displayed. Now I want to assign ...
0
votes
0answers
19 views

Selecting Polygons of one layer with information from table using ArcGIS Desktop?

I have two 2 datasets: A shapefile with many polygons. They all have an ID. A table (.csv) that has one column with IDs. I need to select all Polygons in 1) that are mentioned in the column of ...
0
votes
1answer
28 views

arcpy.SelectLayerByAttribute_management ExecuteError

This python code works in ArcGIS Pro but Not in ArcMap . I read some issues that mention a get around by making a feature layer. I tried that and I then get an error saying polytest doesn't exist. ...
0
votes
0answers
27 views

Invalid expression in SelectLayerByAttribute?

I am coping with a shapefile and I want to select some rows if the values in one column are in a Python list. The following gives the code I write: tpu_involved = list(set(dataframe['SmallTPU'])) ...
0
votes
2answers
36 views

Selecting multiple attributes with variables using arcpy

I'm working on a program for my work and I'm trying to select multiple power line segments from the same shapefile. I'm having trouble with my SQL syntax to pass both variables on to the selection ...
0
votes
1answer
29 views

Query of five fields using ArcPy in ArcMap?

I am using a long script for doing this query using select by attribute: this is the following code: are there any shorter form to do this?: level1 = arcpy.GetParameterAsText(0) level2 = arcpy....
0
votes
1answer
34 views

Automate Selection/Copy Features from Selection

I am new to Python and ArcPy, but I would like to automate this process and/or make my code more efficient here. I am basically selecting a layer by attribute, then copying features from the (selected)...
1
vote
1answer
30 views

Selecting by attributes which have alphabet data using ArcGIS Field Calculator? [closed]

I only want to select values that are entirely alphabetic characters. Select by attributes which I have alphabet data. SELECT ONLY RED INDICATED VALUES
0
votes
0answers
29 views

Iterating through values in Attribute field and performing selection using ArcPy?

I am using ArcGis Pro 2.4 python window. I have seen suggestions of using "SearchCursor" but am unclear how to utilize this tool in the Where-Clause in my SQL selection statement to select by ...
3
votes
2answers
132 views

Searching for single buildings in QGIS

I want to search for different buildings by using the labels I've added to them. Like for instance, I want to search for the building with the label "1630", as in the picture. Is there any specific ...
0
votes
2answers
38 views

Selecting multiple date ranges using Select By Attribute?

Using ArcGIS Desktop 10.6.1. I'm interested in selecting multiple date ranges using Select By Attribute. I've verified that each date range works. For example Date >= '2015-04-15' AND Date <= '...
1
vote
1answer
39 views

Select by Attribute error - ArcPy [duplicate]

I have a table of points that looks something like this: year, latitude, longitude 2018, 42.02, -87.68 2018, 41.91, -87.78 2018, 41.64, -87.68 2017, 41.63, -87.56 2017, 41.89, ...
1
vote
1answer
55 views

Accumulate selections by expression using a for loop (Pyqgis)

I need to run a for loop to select features by their attributes, because the values are within lists (strkey and strvalue). I'm using the following script: k=0 v=0 layer = iface.activeLayer() for ...
2
votes
1answer
25 views

Exporting data by month/year using ModelBuilder?

Using ArcGIS Desktop 10.6.1. I have a large dataset that I need to view sequentially by month AND year. Instead of using Select by Attribute for each month/year combo (i.e. February 2017-May 2019 for ...
1
vote
0answers
28 views

Creating a dataset from attributes in QGIS Graphical Modeler

I need to select just a field from a dataset to compose a model in QGIS 3.4 modeler. How could I extract this field from the main dataset while creating another one?. I've tried with Drop field(s) ...
1
vote
2answers
82 views

Selecting by attribute using Python and a list

I have been using this script to select a feature using Python: layer = iface.activeLayer() layer.selectByExpression('\"Declividad\"= value', QgsVectorLayer.SetSelection) selection = layer....
1
vote
1answer
23 views

Locating records not in selection using ArcPy?

I have a list of addresses that I need to contact. Some are listed in the attribute table, and some aren't. I'm trying to find the ones that aren't. The list: contacted = ['123 STOWE ST', '123 ROSE ...
0
votes
1answer
43 views

How to Select Attributes from a Selection of Attributes

I have a land-cover map for an area in which I want to identify certain attributes that fall within a category. I want to select the shapes that represent wetlands that are in a grassland area. To do ...
2
votes
2answers
129 views

Comparing and find out which feature has highest shape area in QGIS?

I need to find out which polygon is having more area by filtering unique ID. the problem is I have 1000 of features which I need to find out highest occupied area for every unique value... since I ...
0
votes
2answers
35 views

Getting SyntaxError from ArcPy Select by Layer?

I am currently wondering what is the fastest way of using Select By Attributes in arcpy. I have a GDB with a feature class that is quite big. This feature class has a field called CODE with values of ...
1
vote
0answers
44 views

Cannot set input into parameter error on second iteration

On the second iteration of the loop starting line 7 I get the following error. Everything works as intended on the first iteration. Any ideas on why this is failing the second time around? Error: ...
0
votes
1answer
57 views

Selecting max value in SQL query from Extract by Attributes?

I currently have a raster that has 3 columns in the attribute table: OBJECTID, Value, and Count. As part of ModelBuilder, I am running this raster through the Extract by Attributes tool. The Extract ...
1
vote
1answer
31 views

Selection using wildcards [closed]

How can I use wildcards (*) in the ArcGIS Query Builder? It cannot refine my work in Select By Attribute function. 'AA03-FE-P006R' 'AA03-FE-P007R' 'AA03-FE-P006L' Right (Asset_Code,1) = 'L' This ...
0
votes
0answers
103 views

Why is internal memory not overwritten?

I have the following code in Python for ArcMap to first select a property polygon and then with this selection to intersect the layer which contains lines (sewers) (which pass through or are within ...
0
votes
1answer
46 views

Writing where_clause to Select Layer By Attribute for Python Add-in?

I have an add-in script for a toolbox in ArcMap that lets a user select a data frame, a layer within it, a field from the layer, an operator (= , > , <, etc.), and a value from the field. I'm ...
1
vote
0answers
30 views

Executing Select Layer By Attribute in Python Add-in Toolbar (ArcMap)

I'm having trouble with the button class of my code: class OKButton(object): """Implementation for ok.button (Button)""" def __init__(self): self.enabled = True self.checked = False def ...
0
votes
1answer
21 views

Select By Attribute - Get Parameter as Text - User input SQL ArcPy

I am trying to create a script that will search for suitable site locations. I want to let the user input an area size (e.g. >20) to be searched but each time I run the script it comes up as Error ...
-1
votes
1answer
33 views

Select by using ArcPy? [closed]

From the below table: If number of ID_T's counts is more than 2 then, I have to select, same ID_T but DIST value vary of minimum 10 meters
1
vote
1answer
41 views

Select by attribute not working [closed]

I created a point shapefile by converting a raster into points. The default fields generated were FID, Shape, POINT_ID, and GRID_CODE. I added two new fields "X_location" and "Y_location". I ...
0
votes
1answer
41 views

Trying to use a SelectByAttribute_mangement after I made the XY Event layer

I imported a CSV file using the MakeXYEventLayer_management and trying to use the SelectlayerByAttribute_management function, but I am getting error message saying on "Object ID(OID)" is present.. Is ...
4
votes
1answer
273 views

Selecting and updating attribute values using Python console in QGIS?

I am working with Landusefc and Class columns (ref table). What I want is: Selecting all water from "Class" and giving a value say '8' in the "Landusefc" column for these selected features. Table ...
0
votes
1answer
38 views

SQL wildcard for Field Name?

I'm wondering if there's anyway to use a wildcard character in a field name. Like using ["Species_%" = 'Hemlock'] instead of ["Species_1" = 'Hemlock' OR "Species_2" = 'Hemlock' ...]. I tried the way ...
0
votes
2answers
72 views

ArcGIS 10.5 Python toolbox problem SelectLayerByAttributeERROR 000358: Invalid expression Failed to execute

I am trying to create a .pyt that find and select an object in an specific layer but I have a problem. I'm working on the Desktop version 10.5 and actually the code is this one: def getParameterInfo(...
0
votes
1answer
41 views

Select by attribute with field equal to element of vector in ArcPy?

I am trying to select by an attribute with a condition that field equals to an element of a vector. I use a for loop but could not get the right expression for this condition. Here are my codes. ...
-1
votes
1answer
53 views

How to select attribute specific values? [closed]

I have table like I need to select if R_no values is more than two same values and in ANGLE select first three numbers common and more than three attributes is same Finally I want to select like ...
0
votes
1answer
38 views

Counting attribute value based on location using ArcGIS Pro?

I have a school district polygon divided up by neighborhood, and I am trying to determine the number of students from each grade per neighborhood. The student point file contains an attribute with ...
2
votes
1answer
58 views

Select Contour by Length

I am a real beginner with QGIS 2.8. I am able to generate a contour map from a raster DEM, but the contour map is very 'busy' because the land form is pretty flat. There are lots of short contour ...
0
votes
1answer
36 views

Using keyword in SelectByAttribute expression?

I've used SearchCursor to return the single value of a record (8 digit number) for row in arcpy.da.SearchCursor(table, ['PID']): if row[0] is not None: ID = row[0] break Now I would like ...
1
vote
0answers
22 views

Select by attributes ModelBuilder - text string partial values for parameter

I have a feature class of suburbs that I want to do a select by attribute on the Locality (=suburb names) field, passing a user input string parameter to selection expression. I have the query ...
1
vote
1answer
174 views

Getting particular feature using expression in PyQGIS? [closed]

How to get a particular feature using an expression in PyQGIS? For example, there are 100 houses (with 100 entries in Attributes Table). I want to get only one house with field name ("name"=="John's ...
3
votes
1answer
18 views

Calculate a field using text from another field separated with comma

I have an address field containing the following text: "64,ramkoti,hyderabad,500070" I need to copy hyderabad to another field. What would be the code used in the field calculator tool to achieve ...
0
votes
1answer
111 views

Getting ERROR 000840 from arcpy.SelectLayerByAttribute_management? [duplicate]

I am trying to select layer by attribute and for that, I am using arcpy.SelectLayerByAttribute_management function . My command is as follows: arcpy.SelectLayerByAttribute_management(union, '...
0
votes
1answer
51 views

Selecting by attribute by specific characters fields

I have a field "HNR_S". It contains values like "124", "122", "1315", "1465", "15151", "124512642". How can I select more than three numbers?
0
votes
1answer
69 views

Filtering attribute table based on names in another table using QGIS?

I have a shapefile showing a list of district names. I have (currently in Excel) a long list of district names in a table. I would like to filter those districts that are in the other list. I think ...
0
votes
1answer
32 views

ArcPy - Select Layer by Attribute / Delete Selected Layer - SQL

I feel like I've tried so many iterations of this, can anyone assist with how to use ArcPy to selected layer by attribute then delete selected layer? I think my SQL query is incorrect? import arcpy ...
1
vote
1answer
50 views

Cannot select by attribute for new attributes added by join in ArcGIS Pro?

I'm new to ArcGIS Pro and am following some tutorials. I did a join to add some data to the attribute table of one of my layers. Now, when I go to select by attribute and look for those attributes ...