Error with Max on Query

4108
4
Jump to solution
03-24-2015 06:35 AM
EvelynHernandez
Occasional Contributor III

Hello everyone,

I was making a query to a REST service in the v 10.2, with a MAX value, it was working perfectly with the following sentence:

CENTRAL_ID=(SELECT MAX(CENTRAL_ID) FROM CENTRAL_PMGD)

My Rest Srv is containing the following fields:

Fields:

  • OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID , editable: false , nullable: false )
  • EMPRESA_ID ( type: esriFieldTypeInteger , alias: PERIODO_STAR , editable: true , nullable: true )
  • PERIODO_STAR ( type: esriFieldTypeString , alias: PERIODO_STAR , editable: true , nullable: true , length: 6 )
  • CENTRAL_ID ( type: esriFieldTypeInteger , alias: CENTRAL_ID , editable: true , nullable: true )

When i try to do the same query in the v 10.3 i got the following error ...

¿How can i do it?

Thanks for ur answer

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AhmedEl-Sisi
Occasional Contributor III

Check "Use Standardized Queries" for your layer through the rest map service directory first.
It should be like "Use Standardized Queries: true"

Also check documentation for Standardized Queries from 10.3 help.

View solution in original post

4 Replies
AhmedEl-Sisi
Occasional Contributor III

My first thought is to check whether  Standardized Queries is enabled or not.
If enabled the server will not allow the database-specific functions.

0 Kudos
EvelynHernandez
Occasional Contributor III

The thing is, yesterday we updated the srv to the v 10.3. Idk if doing the change that u say it will affect too much to the services or the entire service.

Theres no documentation talking about that in the v10.3 .. just the link that u showed me its talking about 10.2

Maybe the way (sintaxis) to do it is now kinda different.

Anyone has experienced this trouble?

0 Kudos
AhmedEl-Sisi
Occasional Contributor III

Check "Use Standardized Queries" for your layer through the rest map service directory first.
It should be like "Use Standardized Queries: true"

Also check documentation for Standardized Queries from 10.3 help.

EvelynHernandez
Occasional Contributor III

I will try it, thanks for ur answer

0 Kudos