Tip of the Day : SQL Server 2012 New Spatial Instantiable Data Types

Welcome to SQL Server Helper !!!

This site is intended for those who are beginning to use SQL Server as part of their day-to-day activities.  You will find in this site a collection of useful functions, triggers, stored procedures and tips and tricks related to SQL Server.

Should you have any comments or questions regarding this site or if you want to ask SQL Server-related questions, e-mail us here.

We hope we are able to help and we are glad to help!!!

SQL Server Tip of the Day - April 22, 2018

SQL Server 2012 New Spatial Instantiable Data Types

Spatial data represents information about the physical location and shape of geometric objects.  These objects can be point locations or more complex objects such as countries, roads or lakes.  SQL Server supports two spatial data types, introduced in SQL Server 2008, namely the geometry data type and the geography data type.  The geometry type represents data in a Euclidean (flat) coordinate system while the geography type represents data in a round-earth coordinate system.


SQL Server 2012 introduces three new spatial instantiable types, namely CircularString, CompoundCurve and CurvePolygon. These three new instantiable types are circular arc segments. A circular arc segment is defined by three points in a two dimensional plane and the third point cannot be the same as the first point. Methods operating on circular arc segment types use straight line segments to approximate the circular arc. The number of line segments used to approximate the arc will depend on the length and curvature of the arc.


A CircularString is a collection of zero or more continuous circular arc segments. A circular arc segment is a curved segment defined by three points in a two-dimensional plane; the first point cannot be the same as the third point. If all three points of a circular arc segment are collinear, the arc segment is treated as a line segment. Valid circular strings will always have an odd number of points, three or greater.


A CompoundCurve is a collection of zero or more continuous CircularString or LineString instances of either geometry or geography types. An empty CompoundCurve instance can be instantiated, but for a CompoundCurve to be valid it must contain one CircularString or LineString instance and the sequence of CircularString or LineString instances must be continuous.


A CurvePolygon is a topologically closed surface defined by an exterior bounding ring or more interior rings. The interior of the CurvePolygon instance is the space between the exterior ring and all of the interior rings. A CurvePolygon instance is similar to a Polygon instance in that both have at least one ring and zero or more holes (inner rings). However, a CurvePolygon instance differs from a Polygon instance in that a CurvePolygon instance may contain the following circular arc segments: CircularString and CompoundCurve.

SQL Server 2012

SQL Server 2008

User-Defined Functions

Date Functions

A collection of useful user-defined functions that deal with dates.

String Functions

A collection of useful user-defined functions that deal with strings (varchar/char/nvarchar/nchar).

Tree Functions

A collection of useful user-defined functions that deal with tree or hierarchical design structures.

Table-Valued Functions

A collection of useful table-valued user-defined functions that can be used to join with other tables.

SQL Server Built-in Functions

A reference to all built-in functions available within SQL Server grouped into categories.

Tips and Tricks

A collection of useful SQL Server-related tips and tricks:

SQL Server Error Messages

A list of SQL Server error messages and for certain error messages, discusses ways on how to solve the error or work around them:

Frequently Asked Questions