query layer ST_Z(Shape) Postgresql - attribute column not found

962
3
02-02-2017 07:28 PM
Highlighted
New Contributor II

Hi,

This query works in PGAdmin and validates via the Edit query dialog in ArcGIS 10.5 however raises:

select *,ST_Z(Shape) AS "Height" from awsprod.lccgis.FLO_BUILDING_FLOOR_HEIGHTS

If I remove the all important ST_Z(Shape) AS "Height" the query works fine in the attributes.

Regards,

Richard

Tags (2)
Reply
0 Kudos
3 Replies
Highlighted
Occasional Contributor III

I had a similar problem in Oracle the other day.  It was related to using a function that returned value with an input value that was too long (too many string characters) for the function.  So with that, I wonder if your ST_GEOMETRY might be not have z values.  If you view the query's results in pgAdmin what values are being returned from ST_Z(Shape)?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Placing the double-quotes around "Height" may have forced the SELECT result set to have a column named "Height", which ArcGIS cannot "see" because it requires ANSI-conformant SQL naming.  Try eliminating the double-quotes from the SELECT statement.

- V

Highlighted
New Contributor II

Without quotes of any kind this is working. Thanks Vince.

select *,ST_Z(Shape) as Height from awsprod.lccgis.FLO_BUILDING_FLOOR_HEIGHTS