AnsweredAssumed Answered

Query distinct fail on 10.5 with field longer than 22 char

Question asked by francisgagne on Oct 13, 2017
Latest reply on Oct 17, 2018 by CHagevik-esristaff

I'm trying to get the domain of value for a field with 23 characters and it fails.

Here is the query I'm doing on 10.5:

 

queryf=json

&where=1=1

&returnGeometry=false

&spatialRel=esriSpatialRelIntersects

&outFields=UTILISATEURMODIFICATION

&returnDistinctValues=true

&orderByFields=UTILISATEURMODIFICATION

 

It returns 

{"error":{"code":400,"message":"Failed to execute query.","details":[]}}

 

When I remove the returnDistinctValues, it works fine but I get every records.

 

I tried the same exact query on 10.3 with the same MXD and data and the returnDistinct works fine.

 

Here is the log from the server:

Geodatabase error: Attribute column not found [42S22:[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'UTILISATEURMODIFICATIO'.] .

It seems the last characters are truncated. I have the same problem with other fields:

Geodatabase error: Attribute column not found [42S22:[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'INDICATEURPROTECTIONGE'.] 

Outcomes