AnsweredAssumed Answered

Definition query SQL won't accept Left() Function

Question asked by recurvata on Oct 5, 2012
Latest reply on Feb 8, 2019 by tkowal
I tried to use a seemingly harmless SQL query in a definition query to exclude a certain class of parcels. It's just a Left() function, same as I've used many times and places, and is also in Help. The expression is
Left("Name", 4) <> '0002'
I get the attached error. Using = instead of <>, adding the value from unique values, etc, still give the same error. Name is just a text field, nothing special. Tried it in Select By Attributes, same thing. What is going wrong? ArcGIS Info 10.0 sp 4 on Windows 7. Thanks.

[edit] I can get around this with "Name" NOT LIKE '0002%', but still doesn't explain why Left() doesn't work. Also tried !Name![:4] != '0002' and variations, same error.