I have this query in SQL SERVER:
select *
from ADRESSEN
where Transferred is NOT null
and NR_ID not in (Select NR_ID from openquery(PROD, 'Select * from TABELLEN.NUMMERN'))
When I execute this query I get this error:
OLE DB provider "OraOLEDB.Oracle" for linked server "PROD" returned message "".
Msg 7341, Level 16, State 2, Line 12
Cannot get the current row value of column "[OraOLEDB.Oracle].NR_ID" from OLE DB provider "OraOLEDB.Oracle" for linked server "PROD".
But when I comment one of the condition in WHERE and I execute it, the query works:
select *
from ADRESSEN
where Transferred is NOT null
It works! And this too:
select *
from ADRESSEN
where
NR_ID not in (Select NR_ID from openquery(PROD, 'Select * from TABELLEN.NUMMERN'))