From R Studio's ODBC database documentationODBC database documentation I can see a simple example of how to read a SQL table into an R data frame:
The BGBUref data frame will come up in R Studio if I click on the little spreadsheet icon. I just can't figure out how to get it into a defined data frame, in my case df.
Here's the output when I run these commands:
df <- dbReadTable(con, "QnRStore") #> Error: <SQL> 'SELECT * FROM "QnRStore"' #> nanodbc/nanodbc.cpp:1587: 42S02: [Microsoft][ODBC Driver 17 for SQL #> Server][SQL Server]Invalid object name 'QnRStore'. and:
dbListTables(con) #> [1] "spt_fallback_db" #> [2] "spt_fallback_dev" #> [3] "spt_fallback_usg" #> [4] "spt_monitor" #> [5] "trace_xe_action_map" #> [6] "trace_xe_event_map" #> [7] "spt_values" #> [8] "CHECK_CONSTRAINTS" #> [9] "COLUMN_DOMAIN_USAGE" #> [10] "COLUMN_PRIVILEGES" #> ... #> [650] "xml_schema_types" #> [651] "xml_schema_wildcard_namespaces" #> [652] "xml_schema_wildcards" 
