December 16, 2011 at 8:40 am
I forgot how to use an OPEN Query Statement and JOIN to a SQL Server Table.
The SQL Server Table Name is Producer.
Could someone please provide me with the syntax?
SELECT *
FROM OPENQUERY(LSCTLRDAT1, 'SELECT * FROM TBTA11')
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 16, 2011 at 10:15 am
I found what I needed.:satisfied:
SELECT *
FROM Company AS co WITH (NOLOCK)
LEFT JOIN OPENQUERY(LSCTLRDAT1, 'SELECT * FROM PMSPYP00' ) AS DB2
ON DB2.YP_Account_No = co.AccountNo
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy