Hi, I'm using the append tool to update some data. I have entered an sql expression to filter the input data, but the tool completely ignored it and updated all records!
In one case the expression was "NAME <> ' '", in another "SHORTNAME IS NOT NULL". Both resulted in records being overwritten with blanks and nulls, respectively.
I'm also using a field map and a matching field.
Feature classes are in different geodatabases, editor tracking is active on the target feature class. Using AGP 3.6.2
Also: It would be great if there was an update tool, without the insert, or an option within the append tool to disable insert (though the tool name would be misleading in that case). I keep deleting the inserted rows because I only want the update.
Your filter may not be excluding what you think (spaces vs NULLs). SHORTNAME IS NOT NULL only excludes NULL values. It will not exclude empty spaces or strings that are just spaces. NAME <> ' ' excludes exactly one space and will still allow an empty string, two spaces, etc. So your source features can still pass the filter and then append blank/NULL values into the target, overwriting existing values. Try filtering with something that excludes both NULL and "blank-ish" strings. For example:
SHORTNAME IS NOT NULL AND TRIM(SHORTNAME) <> '' or NAME IS NOT NULL AND TRIM (NAME) <> ''
There is a BUG-000157944 for ArcGIS Pro that was fixed at 3.7 that may be related as well.
I'm able to reproduce this with a simple SQL Query (is not null) and matching field for update. As a potential workaround, can you try Select Layer By Attribute on the input data and use that selection instead of the SQL query in the Append tool?