Select to view content in your preferred language

Arcgis Pro Select Layer by Attribute is not working for tables in memory

338
2
02-08-2025 07:34 PM
FelixPertziger
Regular Contributor

I have 2 identical feature classes, - one stored in FGDB and one in 'memory'. They both have 2 text fields, storing the same value in each row. Table for one of them:

FelixPertziger_0-1739071690362.png

When I run this from notepad:

aList = ['FC_ON_DISK','FC_IN_MEMORY']
for infc in aList:
    arcpy.management.SelectLayerByAttribute(infc,"NEW_SELECTION","FieldA = FieldB",None)
    nSelected = int(arcpy.management.GetCount(infc).getOutput(0))
    print (f'Selection count = {nSelected} for {infc}')

I get these messages:

Selection count = 2530 for FC_ON_DISK
Selection count = 0 for FC_IN_MEMORY

The query on table stored in memory is not working from GUI either.

Is this intended behavior?

 

0 Kudos
2 Replies
allison_wadnr
Emerging Contributor

I'm having the same issue @FelixPertziger.   Sounds like a bug, not intended result.  Any luck finding resolution?  

0 Kudos
FelixPertziger
Regular Contributor

It seems they quietly fixed it (sometime between v.3.3 and 3.5), so tool works as expected on tables stored in memory. I am on version 3.6.1. So, just update the software.

0 Kudos