I have the following query imbedded in an SSIS package
SELECT name, geography::Point(STR(Shape.EnvelopeCenter().Lat, 18, 9), STR(Shape.EnvelopeCenter().Long, 18, 9), 4326) AS SHAPE
FROM PolygonLayer
I get the following error when running the query
'geography::Point' failed because parameter 1 is not allowed to be null
I add the following where statement to the above query
where SHAPE not null
But i still get the same error. This is because the select statement is generating the error before the syntax reaches the where statement. How do I get this query to ignore the error and proceed with the selection?
Thanks in advance.
Scott