Hi All, I would like to know how to connect to a "linked server" from R. I find the linked server under Server Objects > Linked Servers on SQL management studio.
Here is the current way I am using to connect to the server: dbhandle <- odbcDriverConnect('driver={SQL Server};server=servername;database=databasename;trusted_connection=true') table1 <- as.data.table(sqlQuery(dbhandle, 'select a, b from table1')) Could you please let me know the syntax to do the same but with the linked server instead? I would like to connect to a database on the linked server and run the query to pull data. Thank you for your help. Best regards, Varun [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.