Using ArcGIS Pro 2.9.5 I found that ArcSDESQLExecute is not able to handle unique identifiers in a table.
I tried to run the following Script:
database = 'C:\\Installation\\updm.sde'
egdb_conn = arcpy.ArcSDESQLExecute(database)
sql_clause = "SELECT PROJECT_ID from DataOwner.My_PROJECTS;"
print(sql_query)
query_return = egdb_conn.execute(sql_clause)
len(query_return)
the table My_PROJECTS has a column PROJECT_ID defined as a uniqueidentifier., the result odf the execution is:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
In [39]:
Line 12: query_return = egdb_conn.execute(sql_clause)
File C:\ArcGISPro\Resources\ArcPy\arcpy\arcobjects\arcobjects.py, in execute:
Line 44: return convertArcObjectToPythonObject(self._arc_object.Execute(*gp_fixargs(args)))
AttributeError: ArcSDESQLExecute: StreamBindOutputColumn ArcSDE Error -65 Invalid pointer argument to function