select * from OPENROWSET('SQLOLEDB', 'server=192.168.1.5;uid=sa;pwd=xxx;database=xxx',
'select * from product where product_no not in ('''+ select product_no from product +''')')where product_no not in ('''+ select product_no from product +''')
这里总是出错,大大,我想问下这里是怎么调用本地表
问题补充:意思是要找出192.168.1.5上存在,本地服务器上不存在的product产品
select * from product where product_no not in (select product_no from OPENROWSET('SQLOLEDB', 'server=192.168.1.5;uid=sa;pwd=xxx;database=xxx',
'select * from product'))
这个我知道,汗,关键是远程服务器上产品数据太多(60~70W条记录),总是超时。
有时候远程服务器上产品增加的话就要调到本地来,超时头疼中啊
'select * from product where product_no not in ('''+ select product_no from product +''')')where product_no not in ('''+ select product_no from product +''')
这里总是出错,大大,我想问下这里是怎么调用本地表
问题补充:意思是要找出192.168.1.5上存在,本地服务器上不存在的product产品
select * from product where product_no not in (select product_no from OPENROWSET('SQLOLEDB', 'server=192.168.1.5;uid=sa;pwd=xxx;database=xxx',
'select * from product'))
这个我知道,汗,关键是远程服务器上产品数据太多(60~70W条记录),总是超时。
有时候远程服务器上产品增加的话就要调到本地来,超时头疼中啊
解决方案 »
- oracle 同步到sqlserver2005
- 请问mysql 怎样将一列的内容变为行的报表? 由于 mysql 版没有人会解答
- 请教SQLSERVER2008迁移到SQLSERVER2005的解决方案,谢谢。
- 求sql语句
- SQLserver 如何中在触发器中执行存储在数据库中的查询语句
- 100分求助一个存储过程
- 求sql语句,应该有人问过的!
- 关于.bak文件导入数据库的问题
- sql语句(条件和变量里的值相同的列出来)
- win2000 server+sql server 2000个人版安装虚拟网卡后,都必须需要设置那些网络环境!如何配置WIN2000的服务器
- 两表匹配省份关健字
- 导入数据时如何更新旧的数据?
这样看看select a.*
from (
select product_no
from OPENROWSET('SQLOLEDB', 'server=192.168.1.5;uid=sa;pwd=xxx;database=xxx','select * from product')
) a left join product b on a.product_no = b.product_no
where b.product_no is null