SELECT有效,但不能创建VIEW

时间:2013-12-29 03:08:28

标签: sql sql-server-2008-r2 geospatial

我有以下SELECT执行我想要的操作,但更喜欢用它来创建VIEW。当我尝试它时,我得到一个关于远程功能的错误.STEquals不被允许。

SELECT 
    [CadData].dbo.CleanLines.FeatId as LINEid,
    [CadData].dbo.CleanLines.Geom as LINEgeom,
    CleanLines.Geom.STEndPoint() as ENDPT,
    CleanLines.Geom.STStartPoint() as STPT,
    start_point.ObjectId,
    start_point.Name as STPTName,
    start_point.[Description] as STPTdesc,
    end_point.Name as EndPointName,
    end_point.[Description] as ENDPTdesc

FROM CadData.dbo.CleanLines 
  JOIN [CadData].Survey.SurveyPoint start_point
    ON CleanLines.Geom.STStartPoint().STEquals(start_point.Geometry) = 1
  JOIN [CadData].Survey.SurveyPoint end_point 
    ON CleanLines.Geom.STEndPoint().STEquals(end_point.Geometry) = 1
  order by LINEid asc

0 个答案:

没有答案
相关问题