0
我正嘗試使用多邊形數據更新類型幾何的列。以下是我的查詢,它給了我奇怪的錯誤。如果有人能讓我知道我在做什麼錯,我會很感激。如何更新SQL Server 2008中的多邊形數據,數據類型幾何
UPDATE Test
set location = geometry::STGeomFromText('POLYGON (148607.181567725
6818657.60249623, 147539.268528918 6817188.04749019, 144563.526399356 6817136.65513745, 144921.154209564 6818629.77966401, 146841.517476705 6819929.72166114, 148012.482915056 6819763.28604383, 148607.181567725 6818657.60249623)',4326) WHERE id=5;
錯誤在SQL Server 2008:
Msg 6522, Level 16, State 1, Line 14
A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry":
System.FormatException: 24142: Expected "(" at position 10. The input has "1".
System.FormatException:
at Microsoft.SqlServer.Types.OpenGisWktReader.RecognizeToken(String token)
at Microsoft.SqlServer.Types.OpenGisWktReader.ParseLineStringText()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonText()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParseTaggedText(OpenGisType type)
at Microsoft.SqlServer.Types.OpenGisWktReader.Read(OpenGisType type, Int32 srid)
at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid)
在此先感謝。