2

I am trying to Select certain fields, resulting from a join using ArcSDESQLExecute but encounter the following error when I try to include the Shape field:

AttributeError: AttributeError(u'ArcSDESQLExecute: SreamBindOutputColumn ArcSDE Error -65 \uec5c',)

Has anyone encountered this error before?

The Geometry type is multipolygon for the Shape field, the other fields are text and integer I'm using RDBMS MS SQL Server 2012 SP1 andArcGIS Desktop 10.2.2.3552

2
  • 2
    Could you please specify which RDBMS is in use, state the version of ArcGIS, and provide a description of the datatypes of all selected columns? All columns would be better, with the SQL statement in context.
    – Vince
    Commented Mar 12, 2015 at 1:19
  • And (possibly) the geometry type. Some databases support many different geometry types, values include ST_GEOMETRY, PG_GEOMETRY (for PostGIS), WKB, WKT (though not often) and more!. Commented Mar 12, 2015 at 2:13

1 Answer 1

5

I ran into this error when trying to get the results from a SELECT statement involving the shape (ST_GEOMETRY) field from ArcSDE on Oracle 11g. Casting the shape field to varchar2 ended up working for me. Try this :

SELECT col1,
col2,
cast(sde.st_astext(shape) AS varchar2(4000)) AS wkt_geom
FROM tab

I was dealing with points, so the 4000 byte limit of the varchar2 data type was not an issue. You should get an ORA-22835 error if the st_astext string exceeds the varchar2 limit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.