Select to view content in your preferred language

Error in feature class label SQL Where clause when using Shape.STLength()

1371
7
Jump to solution
12-29-2023 12:51 PM
Labels (2)
LanceCole
MVP Regular Contributor

About three weeks ago, we updated to ArcGIS Enterprise 11.2.  Last weekend, we updated our enterprise database from 10.8 to 11.2.  In ArcGIS Pro 3.2, we are noting issues with all feature classes that utilize a SQL Where clause for labeling based upon the field Shape.STLength().  When labeling is on, hundreds of drawing alerts are produced for any of these features.  The message states that an "Error parsing the WHERE clause. One or more fields could not be found."

This has worked without issue since moving to ArcGIS Pro some time ago.  I created a straightforward linear feature on our enterprise database and drew a handful of lines.  Once I set a SQL Where clause to use the Shape.STLength() field drawing alerts began to appear.  We typically use this field to label features differently based upon the length.  Any ideas?

The data is accessed directly to the database using an SDE connection string and the systems are using Microsoft ODBC Driver v18.3.1.1.  

LanceCole_0-1703882830404.png

 

1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

Open a case with Esri Support, likely a regression defect in Pro 3.2.

I can replicate this issue with a new/clean 11.2 enterprise geodatabase on SQL Server 2022 and Pro 3.2.  Using SQL Profiler, the SQL being passed to SQL Server is good and doesn't generate any errors or warnings, so this seems to be an internal Pro issue.

View solution in original post

7 Replies
JoshuaBixby
MVP Esteemed Contributor

Open a case with Esri Support, likely a regression defect in Pro 3.2.

I can replicate this issue with a new/clean 11.2 enterprise geodatabase on SQL Server 2022 and Pro 3.2.  Using SQL Profiler, the SQL being passed to SQL Server is good and doesn't generate any errors or warnings, so this seems to be an internal Pro issue.

LanceCole
MVP Regular Contributor

@JoshuaBixby,

Thanks for the reply and for confirming you are experiencing the same on a clean install.  I have a ticket in with ESRI, but with the holiday weekend, it will be mid-week for a reply.  In the interim, we have modified the layers where we are using labeling based on the shape.STLength() field.  I am not sure if it became an issue with Pro 3.2, upgrading to 11.2 on our enterprise deployment or the database update from 10.8 to 11.2.  Did not see anything on initial testing and for some reason the issue does not occur on our published  feature and map services to the same database just a direct SDE connection.

Happy New Year!

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I am guessing it is a Pro 3.2 issue since: 1) the SQL being passed to SQL Server seems to work fine, and 2) everything renders fine in Pro even with the notification something isn't being parsed correctly.

0 Kudos
JeffLegato1
Occasional Contributor

This is still an issue at 3.2.2. I found BUG-000164308 as mentioned by @LanceCole

0 Kudos
Bud
by
Honored Contributor

When I’ve had SDE.ST_GEOMETRY (Oracle) issues that are somewhat similar to this (the culprit is usually versioning), I’ve used a subquery as a workaround.

Here’s an untested Oracle WHERE clause that uses a subquery (aka a subselect):

OBJECTID IN (SELECT OBJECTID FROM TEST_LINE WHERE SDE.ST_LENGTH(SHAPE) > 200)

Would something like that work?

 

0 Kudos
LanceCole
MVP Regular Contributor

All, 

After working with ESRI support the past week, we were able to confirm this is a bug in ArcGIS Pro with not only SQL but other Enterprise Databases as well - BUG-000164308.  The issue was present before version 3.2 and caused "flashing" of the ArcGIS Pro Desktop when using the shape.stlength() field in the labeling -  SQL Where clause.  In version 3.2 Drawing Alert messages were added allowing us to be able to narrow in on the source of the problem. 

Thanks, @JoshuaBixby for your time and for digging in to confirm the issue.

JackC
by
New Contributor II

 This is also occuring without using geometry fields. I'm using 3.2.2 and I get this drawing error if I set ANY SQL expression for my labels.

0 Kudos