Saving Query in Select by Attributes Issue with Blank Values

518
3
06-23-2020 06:30 AM
PeteJordan
Occasional Contributor III

  I have a query:

FAC_TYPE IN ('SHARED LANE', 'PAVED SHOULDER', 'BICYCLE LANE', 'SEPARATED BICYCLE LANE', 'BICYCLE BOULEVARD') And (NAME = '' Or NAME IS NULL) And UPDATED = 'YES'

(sorry I can't figure out, using the Syntax Highlighter, how to change the bold or color of the part I want highlighted)

  The important part is I not only have NULL values, but blank ones that are only found using the NAME = ''.  The issue is if I cut and past my code into the SQL it works fine, however if I save this query for future use and re-load it, the '' is removed each time (NAME = ) and the query fails until I manually have to add the quotes back in.

Here's what it looks like when loading it back up:

FAC_TYPE IN ('SHARED LANE', 'PAVED SHOULDER', 'BICYCLE LANE', 'SEPARATED BICYCLE LANE', 'BICYCLE BOULEVARD') And (NAME =  Or NAME IS NULL) And UPDATED = 'YES'

Where NAME = shows up with out the ''.

  Anyway to fix this when saving queries or is this just a bug?

0 Kudos
3 Replies
JoshuaBixby
MVP Esteemed Contributor

Kory Kramer‌, this definitely seems like a defect.

I just tested on Pro 2.6 beta, and this behavior still exists, and it is definitely a defect.  The behavior is even worse than it appears because it will strip leading or trailing spaces from text strings with text in them.  The output EXP file looks correct, so this appears to be an import issue in Pro.

KoryKramer
Esri Community Moderator

Thank you, Joshua.  I saw your comment in the Early Adopter Community, and I've shared this with the appropriate development team internally to take a look.

Thanks again for helping to get this in front of the development team to assess.

PeteJordan
Occasional Contributor III

Yes thanks Joshua and Kory for getting this sent to the correct people.  I wasn't sure it was a bug or not, so I didn't want to post it in the Bug forum...

0 Kudos