Convert multipoint to point in SQL Server

737 Views Asked by At

I have a table in SQL Server where points are stored as a mix of point and multipoint although all are just points. Unfortunately, the multipoints are causing problems elsewhere, so I need to convert them to points.

Is there a simple procedure for this? I haven't been able to find one.

1

There are 1 best solutions below

1
On BEST ANSWER

update MyTable set MyGeometry = MyGeometry.STGeometryN(1).STAsText() where MyGeometry.STAsText() like 'Multi%';