Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 OpenQuery problems with JOIN

Author  Topic 

JimmyFo
Starting Member

11 Posts

Posted - 2008-09-12 : 15:30:03
Hi there, this is a simplified version of a SQL statement I am trying to execute. The call is from a 2005 server to a 2000 table on a linked server:

SELECT * FROM OPENQUERY(PODPLADB, 'SELECT F.MarketName, F.MediaName FROM tblFsiCoop F')


That executes well. But if I wanted to do a JOIN with a table that resides on the calling (i.e. the 2005) server, then I can no longer get results. How would I use the results from a OPENQUERY to a linked server in a JOIN with the main 2005 server?

Thanks,
James

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-09-12 : 15:36:30
quote:
Originally posted by JimmyFo

Hi there, this is a simplified version of a SQL statement I am trying to execute. The call is from a 2005 server to a 2000 table on a linked server:

SELECT * FROM OPENQUERY(PODPLADB, 'SELECT MarketName, MediaName FROM tblFsiCoop ')F
Inner join yourtable Y
on F.Col = Y.col


That executes well. But if I wanted to do a JOIN with a table that resides on the calling (i.e. the 2005) server, then I can no longer get results. How would I use the results from a OPENQUERY to a linked server in a JOIN with the main 2005 server?

Thanks,
James

Go to Top of Page
   

- Advertisement -