Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

STEndpoint (geography Data Type)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

Returns the end point of a geography instance.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.


.STEndPoint ( )

SQL Server return type: geography

CLR return type: SqlGeography

Open Geospatial Consortium (OGC) type: Point

STEndPoint() is the equivalent of STPointN(x.STNumPoints()).

This method returns null if called on an empty geography instance.

The following example creates a LineString instance with STGeomFromText() and uses STEndpoint() to retrieve the end point of the LineString.

DECLARE @g geography;
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.STEndPoint().ToString();

Community Additions

ADD
Show:
© 2015 Microsoft