2012-03-29 11 views
3

私は私の(明らかに愚かな)エラーを見つけることができないと思う:-)。データベース上でSELECT文の後空間データ型

SELECT geography::STMPolyFromText('MULTIPOLYGON((((11.791039 47.5448077, 11.7910551 47.544757, 11.7911677 47.5446375, 11.7644687 47.542786))))',4326) 

とエラーは次のようになります。

NET Framework error occurred during execution of user-defined routine or aggregate "geography": 
System.FormatException: 24141: A number is expected at position 26 of the input. The input has (11.791039. 
System.FormatException: 
    at Microsoft.SqlServer.Types.WellKnownTextReader.RecognizeDouble() 
    at Microsoft.SqlServer.Types.WellKnownTextReader.ParseLineStringText() 

私のミス、エラーを参照のかもしれないものを見つけるCan't?!


ちょうど解決策を見つけた:「(」すぎた

答えて

1

私はMULTIPOLYGON ... this example shows only 3は、しかし、あなたは4

を持った後、あなたは括弧の1あまりにも多くのペアを持っていると思います。代わりに、試してみてください:

SELECT geography::STMPolyFromText 
(
    'MULTIPOLYGON 
    ( 
     (
      (
       11.791039 47.5448077, 
       11.7910551 47.544757, 
       11.7911677 47.5446375, 
       11.7644687 47.542786 
      ) 
     ) 
    )',4326 
) 
関連する問題