I have a table as such:
All columns are Decimal(18, 3), there are also millions of rows.
I would like to add a fourth column to be a geometry point. I have tried but to no avail:
alter table [dbo].[o5bim] add ogr_geometry as geometry::STGeomFromText('Point('+column1+' '+column2+' '+column3+')', 0)
Driving me insane! Cheers
Advertisement
Answer
As mentioned by @lptr in the comments, you can use STPointFromText
alter table dbo.[o5bim] add ogr_geometry as geometry::STPointFromText(concat('POINT (', column1, ' ', column2, ' ', column3, ')'), 0);