January 17, 2008 at 3:19 am
Hi
I have 2 sql servers SQL1 and SQL2. SQL1 contains a table employees.
I want to query the table from SQL2 by openrowset function.
please give me the query
Binu
January 17, 2008 at 4:34 am
here you go, from Books On Line:
SELECT a.*
FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',
'SELECT GroupName, Name, DepartmentID
FROM AdventureWorks.HumanResources.Department
ORDER BY GroupName, Name') AS a;
openrowset is by default disabled in SQL 2005.
...and your only reply is slàinte mhath
January 17, 2008 at 4:36 am
Thanks
What is the syntaxt in sql 2000 server
Binu
January 17, 2008 at 4:53 am
Sorry, I don't want to be offensive, but you don't have by any chance BOL installed on your machine?
Syntax is same. I just checked.
...and your only reply is slàinte mhath
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply