Current SQL Server Blog Articles
Using FME 2008 Beta I loaded a shapefile containing Local Government Areas in Tasmania into SQL Server 2008 “Katmai”. The shapefile didn’t have a .PRJ and I forgot to set the SRID in FME.
So, without reloading the shapefile how can I change the SRID?
Firstly, open the Microsoft SQL Server Management Studio, open the database and click on the “New Query” button.
To see what the loaded SRID was I can do this:
The returned result is 0.
Now to set a SRID of 28355 is dead easy. Use the same property method STSrid in an update statement:
Note that in SQL Server all references to OGC 1.1 functions and operators are case-sensitive so make sure you type STSrid and not STSRID. Also since the SRID is a property of the object we don’t need round brackets on the property ie STSrid() would be incorrect.