数据源m4 m7 m8
AcDbLine 1158.835 783.9596 (1)
AcDbLine 1161.335 919.7882 (2)
AcDbLine 1315.085 890.2264
AcDbPoint 1158.835 783.9596 (1)
AcDbPoint 1315.085 890.2264
AcDbPoint 1315.085 919.7882 (2)
要求用SQL处理,(1)=(1), (2)=(2)当m4=AcDbLine 的m7、m8 与 m4=AcDbPoint 的m7、m8相等 的不重复数据m7,m8
我现在用的是循环法,不知sql能解决吗?
AcDbLine 1158.835 783.9596 (1)
AcDbLine 1161.335 919.7882 (2)
AcDbLine 1315.085 890.2264
AcDbPoint 1158.835 783.9596 (1)
AcDbPoint 1315.085 890.2264
AcDbPoint 1315.085 919.7882 (2)
要求用SQL处理,(1)=(1), (2)=(2)当m4=AcDbLine 的m7、m8 与 m4=AcDbPoint 的m7、m8相等 的不重复数据m7,m8
我现在用的是循环法,不知sql能解决吗?
select * from (select * from 表 where m4='AcDbLine') A where A.m7 not in (select m7 from 表 where m4='AcDbPoint') and A.m8 not in (select m8 from 表 where m4='AcDbPoint')
union all
select * from (select * from 表 where m4='AcDbPoint') A where A.m7 not in (select m7 from 表 where m4='AcDbLine') and A.m8 not in (select m8 from 表 where m4='AcDbLine')
)