Hi Sergey,
I created a linked server but I don't understand why the four parts names select doesn't work, while OPENQUERY() works fine
Here are the two sample code I used to make test.
ECHANGE is my linked server, using OLEDB Provider for SQL Server,
G2MIR is the database and
TEST is the table
select * from echange.g2mir.dbo.test
select * from openquery(echange, 'select * from test')
The OPENQUERY returns all datas from my TEST table, It permit me to insert or delete datas, but I'd prefer to use four parts select.
Thanks
>Hi Marc,
>
>You can create a linked server and than run queries agains it using four parts names (server.db.dbo.table) or OPENQUERY() function. You can also use OPENROWSET() function. See BOL for details.
>
>>
>>Can somebody help me to make a SELECT on a distant SQL server.
>>
>>For example, I have a stored procedure which is runningon a SQL server (1)and I must import datas from another SQL server (2). I tested several kind of SELECT, but nothing works.
>>
>>Any help is welcome.
>>
>>Thanks