Regarding technical article #000011333:
Bug: Unable to define a query layer in ArcGIS where the data source uses an st_geometry subtype in O...
Workaround:
Convert the geometry attribute field from the subtype (for example, st_point) to the supertype st_geometry.
The docs say we should convert the ST_POINT subtype to ST_GEOMETRY supertype. But they don't say how to make the conversion.
The only way I've found so far is to convert to WKB or WKT and then back to ST_GEOMETRY:
--This works, but is clunky and slow:
sde.st_geomfromwkb(sde.st_asbinary(...)).
Is that how Esri recommends we make the conversion? It would help if Esri could explicitly tell us what is meant there. Thanks.
Note:
I've tried using the TREAT() function too. But that didn't seem to work properly:
Stack Overflow: Convert UDT subtype to supertype
Related: Convert MDSYS.ST_LINESTRING subtype value to MDSYS.ST_GEOMETRY supertype