AndyHopper
Programmer
Here's my table structure;
idxmls1 - the data on the remote server
------
id
etc....
ToDownload - a list of id numbers I need to download
----------
MLS
Here's the query I'm trying to execute to generate the data from the remote server. The query executes without any problems, however neither WHERE clause seems to be executed. All rows from idxmls1 are returned.
SELECT idxmls1.*
FROM idxmls1 WHERE mod_date_time > (SELECT matchDate FROM OPENROWSET('SQLOLEDB','sql.myhost.com';'uid';'pwd',
'SELECT matchDate FROM amIDX.amSql.MatchDate')) OR [id] IN (SELECT ToDownload.MLS FROM OPENROWSET('SQLOLEDB','sql.myhost.com';'uid';'pwd',
'SELECT MLS FROM amIDX.amSql.ToDownload') as ToDownload)
I'm not sure why this isn't working? Each subquery returns the appropriate result when executed independently.
idxmls1 - the data on the remote server
------
id
etc....
ToDownload - a list of id numbers I need to download
----------
MLS
Here's the query I'm trying to execute to generate the data from the remote server. The query executes without any problems, however neither WHERE clause seems to be executed. All rows from idxmls1 are returned.
SELECT idxmls1.*
FROM idxmls1 WHERE mod_date_time > (SELECT matchDate FROM OPENROWSET('SQLOLEDB','sql.myhost.com';'uid';'pwd',
'SELECT matchDate FROM amIDX.amSql.MatchDate')) OR [id] IN (SELECT ToDownload.MLS FROM OPENROWSET('SQLOLEDB','sql.myhost.com';'uid';'pwd',
'SELECT MLS FROM amIDX.amSql.ToDownload') as ToDownload)
I'm not sure why this isn't working? Each subquery returns the appropriate result when executed independently.