Quantcast
Channel: SQL Server Spatial forum
Viewing all articles
Browse latest Browse all 364

'geography::Point' failed because parameter 1 is not allowed to be null

$
0
0

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


Viewing all articles
Browse latest Browse all 364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>