I'm having trouble finding the correct command to change databases in R-Studio. I know I can connect to a specific database at the initial connection but I can't seem to find the correct way to execute a "use" command (e.g. "use my_schema").
The following fail with various errors:
dbSendQuery(conn, "use my_schema"); dbExecute(conn, "use my_schema"); dbSendStatement(conn, "use my_schema");
I'm not finding what I'm looking for in the documentation here:
https://www.rdocumentation.org/packages/RJDBC/versions/0.2-8/topics/JDBCConnection-methods
https://www.progress.com/blogs/complete-guide-to-r-for-datadirect-odbc-jdbc
https://community.snowflake.com/s/article/Executing-use-commands-in-R-Studio
https://rdrr.io/cran/RJDBC/
2.1m questions
2.1m answers
60 comments
57.0k users