问题:
表一结构
VersionId int not null,
MCellId nvarchar(64) not null,
NCellId nvarchar(64) not null,
AccordNoise decimal null,
表二结构
VersionId integer not null,
MCellId nvarchar(64) not null,
NCellId nvarchar(64) not null, 我想做到的是:表一中AccordNoise > 0.05 而表一中MCellId和NCellId的一对值又在表二中没有的一个结果
和 AccordNoise < 0.0001 而表一中MCellId和NCellId的一对值又在表二中没有的一个结果的合集望各位大侠指点
表一结构
VersionId int not null,
MCellId nvarchar(64) not null,
NCellId nvarchar(64) not null,
AccordNoise decimal null,
表二结构
VersionId integer not null,
MCellId nvarchar(64) not null,
NCellId nvarchar(64) not null, 我想做到的是:表一中AccordNoise > 0.05 而表一中MCellId和NCellId的一对值又在表二中没有的一个结果
和 AccordNoise < 0.0001 而表一中MCellId和NCellId的一对值又在表二中没有的一个结果的合集望各位大侠指点
from table1
where AccordNoise > 0.05 or AccordNoise < 0.0001
except
select MCellId, NCellId
from table2
from table1
where (AccordNoise > 0.05 or AccordNoise < 0.0001 )
and MCellId not in(select MCellId from table2) and NCellId not in(select NCellId form table2)