View source: R/utils-usa_query_database.R
usa_query_database | R Documentation |
Wrapper to make a query from a sql file and get the data from a database using RODBC
usa_query_database(
queryFilename,
db,
uid,
pw = "",
sp = " ",
start = " ",
end = " ",
asis = FALSE
)
queryFilename |
The filename of the sql query to read in. |
db |
The name of your database connection. |
uid |
Your user ID. |
pw |
The password for the database connection. If omitted, RODBC will prompt you for a password and will mask it. If entered, it will be visible and unsecure. |
sp |
The species scientific name to extract from the database. |
start |
The start year. |
end |
The end year. |
ais |
A logical, specifying whether or not to convert columns, as in
|
Calls RODBC
functions. The function first opens an ODBC
connection and, using sql, extracts data from the db
.
Kelli F. Johnson
sqlQuery
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.