December 1, 2005 at 1:20 pm
I'm encountering a problem w/ this script ~ whichwon't recognize the my table/ (I've changed my object name to MyServerName.MyDBname.dbo.MyTable)
Does anything stand out in the 4-tier object definition below?
declare @CurID as int
declare @MaxExp as datetime
declare c cursor forward_only for select * from FixScript_IDs
Open c
fetch next from c into @CurID
while @@fetch_status = 0
begin
declare @Match int
set @Match = (select count(*) from pmint2.pmi.dbo.tblMemberAuth where id=@CurID)
if @Match>0
Begin
print @CurID
print 'Already exists'
End
else
Begin
select @CurID as ID,FixScript_CGIData.webpassword as password
into MyServerName.MyDBname.dbo.MyTable ---<< DOES NOT LIKE THIS request!
from FixScript_CGIData where id=@CurID
End
end
end
fetch next from c
into @CurID
close c
deallocate c
December 1, 2005 at 1:28 pm
Did u define a linked server before executing the query? If the linked Server entry is not found in the sysservers table - u cannot execute the given query.
December 1, 2005 at 1:29 pm
Or try OPENROWSET instead
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply