Creating a temporary in-memory SQL Server database

Hello!

I am writing unit tests for my company's custom SQL functions. I would like to connect to an in-memory DB per test instead of connecting to an actual DB. Similar to how {RSQLite} does it, however, my company uses SQL Server and the SQL I need to test doesn't work with {RSQLite}.

Is there a way to create an in-memory version of "ODBC Driver 17 for SQL Server" similar to con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")?

I am hoping to achieve it by modifying the following

odbc::dbConnect(
  drv = odbc::odbc(),
  driver = "ODBC Driver 17 for SQL Server"
)

Is this possible?

Thanks,

Kyle

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.