where 'deep' is the name of the my external database resides.
'link_sanjay' is the name of my link server through which I would be connecting to external database.
after this I added logins:
EXEC sp_addlinkedsrvlogin link_sanjay, 'false', NULL, NULL, NULL
when i am executing following query from query analyzer, it works perfectly fine:
SELECT a.* FROM OPENROWSET
('SQLOLEDB','local_server';'sa';'' , 'select * from
link_sanjay.sales.dbo.tbl_orders') as a
this would definitely return me a set of record which I want to use as I used to use cursor. I want to scroll through each record and read value. can anybody tell me how to do that?
Is this the right approach I have taken to read records from external database and to scroll through like a cursor? or if there is any other way, pls let me know...