AnsweredAssumed Answered

"Make Query Layer" issue between ArcMap and Pro.

Question asked by joel.meier on Jun 13, 2019
Latest reply on Jun 13, 2019 by joel.meier

If I run the following query in python 2.7  it allows me to use OBJECTID as the unique ID field but in python 3 it does not. Does anyone know why or how to get it to work?

 

SELECT (ROW_NUMBER() OVER(ORDER BY ARN)) as OBJECTID, ARN, MOD_DATE, Shape FROM dbo.vw_GC_ARN

 

full code I was using:

 

arcpy.MakeQueryLayer_management(
lro16, "parcels", """SELECT (ROW_NUMBER() OVER(ORDER BY ARN)) as OBJECTID, ARN, MOD_DATE, Shape FROM dbo.vw_GC_ARN""", "OBJECTID", "POLYGON", srid="5320")

Outcomes