你的内层SQL返回的结果集多于一行,系统不知如何显示。搞清楚你想要什么样的结果先。

解决方案 »

  1.   

    试试这个:Select IntOrgDwId from D1_A021_InternalOrganization
      where PositionDwId in
      (
    Select DISTINCT B.PositionDwId
    from S0_GeoTreeNode A, dbo.D1_A021_Position B
    WHERE A.Id = B.PositionSourceId
    AND A.GeoAreaId = CGTA.CustomerGeoTreeArea_GeoTreeAreaId
    AND GeoTreeId = CGTA.CustomerGeoTreeArea_GeoTreeId

      

  2.   

      where PositionDwId in
      ( 
    Select DISTINCT B.PositionDwId 
    from S0_GeoTreeNode A, dbo.D1_A021_Position B 
    WHERE A.Id = B.PositionSourceId 
    AND A.GeoAreaId = CGTA.CustomerGeoTreeArea_GeoTreeAreaId 
    AND GeoTreeId = CGTA.CustomerGeoTreeArea_GeoTreeId 
    )   
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://feiyun0112.cnblogs.com/