ODBC connection


I am quite beginner in R.
I am trying to get data from an ODBC connection. I am using RODBC library.

I do not manage to load into a frame a table. To reach the table I need to specify the right Catalog and schema, but there is no way to specify them in the sqlfetch function.

Can you help me?


Can you show a small coding example of what you have tried so far? It is hard to tell where your problem is without seeing any code.

To get data out of the database you simple have to use a sql query, the general form would be like this

data <- sqlQuery(connection_name, 'SQL query') 


In this code :

data <- sqlQuery(connection_name, 'SQL query')

Where should I write the Catalog, schema and table names ? In the SQL query?


Yes, if they are not the default, then you have to specify them in the sql query.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.