Re: [R] syntax to connect to linked SQL server using RODBC

2016-09-13 Thread Manohar Reddy
Hi Varun, Basically when we are pulling data from linked server through SSMS/some other client tools we may need to use query like this format * linkedservername.databasename.schemaname.tablename* and in this case your query like this, table1 <- as.data.table(sqlQuery(dbhandle, 'select * from

Re: [R] syntax to connect to linked SQL server using RODBC

2016-09-13 Thread Jeff Newmiller
This is not an R concept, and it may be highly specific to the SQL Server API rather than the ODBC API. You might try doing as the Posting Guide recommends and posting in the R-sig-db mailing list. I would also recommend that you figure out from Microsoft documentation what programming API your

[R] syntax to connect to linked SQL server using RODBC

2016-09-13 Thread Varun Sinha
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