Hi may i know what wrong this this query
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
if it is problem in collation conflict with Location column than use below:
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
same applies to your 'in' filter if above does not work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.