嗨,我可能知道这个查询
怎么办SELECT [no]
-- into #mytemp
FROM [pcb_comp]
where no in (SELECT [no] FROM [Data_Query].[dbo].[query]
where [no] NOT IN (select no from [IPTS2].[dbo].[abc]))
and location = 'PCB'
order by no
如果在与位置列的整理冲突中是问题,而不是使用以下内容:
SELECT [no]
-- into #mytemp
FROM [pcb_comp]
where no in (SELECT [no] FROM [Data_Query].[dbo].[query]
where [no] NOT IN (select no from [IPTS2].[dbo].[abc]))
and location COLLATE DATABASE_DEFAULT = 'PCB' COLLATE DATABASE_DEFAULT
order by no
如果上述不起作用,则适用于您的" In"过滤器。