Select Layer by Attribute Issues in Pro 3.1

533
7
Jump to solution
02-16-2024 06:58 AM
Ed_
by MVP Regular Contributor
MVP Regular Contributor

So I have this Excel XLSX file that I am bringing in as a GDB table into a model builder. I added a `Delete Field` tool to delete two columns (which works fine) and then I connect the output of that to the `Select Layer by Attribute` tool.  But, the `Select Layer by Attribute` tool query doesn't work, like it does not return any selection, even thought the query works fine outside the model.  

X IS NOT NULL And Street_Address = ''

 

Ed__2-1708095244876.png

 

 

Whole model:

Ed__3-1708095276369.png

 

 

 

 

Question | Analyze | Visualize
0 Kudos
4 Solutions

Accepted Solutions
Ed_
by MVP Regular Contributor
MVP Regular Contributor

The same  query works fine outside the model builder on the same dataset.

Question | Analyze | Visualize

View solution in original post

0 Kudos
DanPatterson
MVP Esteemed Contributor

If it is just a table, did you try

Table Select (Analysis)—ArcGIS Pro | Documentation

or you might want to add the modelbuilder tool to your workflow

If Selection Exists (ModelBuilder)—ArcGIS Pro | Documentation


... sort of retired...

View solution in original post

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hi @DanPatterson, thank you for the quick response but, the `Table Select` tool is not working either. 

Question | Analyze | Visualize

View solution in original post

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hi @SLouq, thank you for the quick response but, I can't seem to find `is` under the conditions drop down menu. Are you saying I should type `is` instead of `=` in SQL mode?

Question | Analyze | Visualize

View solution in original post

7 Replies
SLouq
by MVP Regular Contributor
MVP Regular Contributor

Have you tried 'Or'? instead of AND

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

The same  query works fine outside the model builder on the same dataset.

Question | Analyze | Visualize
0 Kudos
SLouq
by MVP Regular Contributor
MVP Regular Contributor

Try Street Address is '' instead of Street Address is equal ''

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hi @SLouq, thank you for the quick response but, I can't seem to find `is` under the conditions drop down menu. Are you saying I should type `is` instead of `=` in SQL mode?

Question | Analyze | Visualize
DanPatterson
MVP Esteemed Contributor

If it is just a table, did you try

Table Select (Analysis)—ArcGIS Pro | Documentation

or you might want to add the modelbuilder tool to your workflow

If Selection Exists (ModelBuilder)—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hi @DanPatterson, thank you for the quick response but, the `Table Select` tool is not working either. 

Question | Analyze | Visualize
0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

I ended up using the `Export Table` tool to run the query (which now works) as well as delete the columns I don't need in one go. 

Question | Analyze | Visualize
0 Kudos