还是openrowset的问题,还得请教各位!!!!
http://community.csdn.net/Expert/topic/3085/3085239.xml?temp=1.107424E-02
已结帖,由于问题还在,重开一个再问!!!
谢谢 zjcxc(邹建)和netcoder(朱二)两位的回复!
问题还是存在的!!!!
delete from dsfinger a
where exists(
select 1 from opendatasource( 'sqloledb ', 'Integrated Security=SSPI;Data Source=ch ').idverify.dbo.dsfinger where usid=a.usid)
执行上面的命令时提示错误:[第 1 行: 'a ' 附近有语法错误。]
select * from dsfinger a
where exists(
select 1 from opendatasource( 'sqloledb ', 'Integrated Security=SSPI;Data Source=ch ').idverify.dbo.dsfinger where usid=a.usid)
执行上面的命令成功
delete dsfinger from dsfinger a
where exists(
select 1 from opendatasource( 'sqloledb ', 'Integrated Security=SSPI;Data Source=ch ').idverify.dbo.dsfinger where usid=a.usid)
执行上面的命令提示错误:[在 sysservers 中未能找到服务器 ' "idverify ". "dbo ". "dsfinger " '。请执行 sp_addlinkedserver 以将服务器添加到 sysservers。]
select * from dsfinger a,(select * from opendatasource( 'sqloledb ', 'Integrated Security=SSPI;Data Source=ch ').idverify.dbo.dsfinger) as b
where a.usid=b.usid
执行上面的命令成功
delete from dsfinger a,(select * from opendatasource( 'sqloledb ', 'Integrated Security=SSPI;Data Source=ch ').idverify.dbo.dsfinger) as b
where a.usid=b.usid
执行上面的命令时提示错误:[第 1 行: 'a ' 附近有语法错误。]
------解决方案--------------------
delete dsfinger from dsfinger a
where exists(
select 1 from opendatasource( 'sqloledb ', 'Integrated Security=SSPI;Data Source=ch ').idverify.dbo.dsfinger where usid=a.usid)