Modifying existing SQL expression disables definition query

476
1
Jump to solution
02-06-2023 01:47 PM
Bud
by
Notable Contributor

ArcGIS Pro 3.0.3; mobile geodatabase:

Using a standalone table like this:

Bud_0-1675719384325.png.

ASSET_ID    DATE_           CONDITION
--------    ----------      ---------
1           2016-04-01      1
1           2019-03-01      2
1           2022-01-01      3
2           2016-04-01      4
2           2022-01-01      5
3           2022-01-01      6
3           2022-03-01      7
3           2018-03-01      8
3           2013-03-01      9
3           2010-06-01      10
3           2022-03-01      11
3           2022-03-01      11

 

And using a non-expression builder definition query like this:

--sql comment
OBJECTID IN (3, 5, 11)

Bud_1-1675719450307.png


...or like this:

objectid IN (
     SELECT objectid
       FROM roadinsptable r2
      WHERE r2.asset_id = roadinsptable.asset_id
   ORDER BY date_ DESC, condition DESC
      LIMIT 1
            )

Bud_2-1675719516683.png

 

Both of those definition queries work as-is and are active.

But after creating those definition queries, if I were to modify the SQL by doing something like add a few spaces to the end, or change a 1 to a 2, then the definition query would get disabled.

For example, if I were to change

--sql comment
OBJECTID IN (3, 5, 11)

to

--sql comment
OBJECTID IN (3, 5, 12)

then that would disable the definition query. That's not the expected result.


Here's a video example of adding spaces to the end of an SQL expression:

Is that a known issue?


Related: Make definition query's toggle more intuitive

0 Kudos
1 Solution

Accepted Solutions
Bud
by
Notable Contributor
Esri Canada Case #03259723 - ArcGIS Pro: Modifying existing definition query disables the query
 
Esri inc confirmed that this issue is related to the previous bug [BUG-000155660] so we do not need to make a new one.

View solution in original post

0 Kudos
1 Reply
Bud
by
Notable Contributor
Esri Canada Case #03259723 - ArcGIS Pro: Modifying existing definition query disables the query
 
Esri inc confirmed that this issue is related to the previous bug [BUG-000155660] so we do not need to make a new one.
0 Kudos