queryDB.Rd
Wrapper to make a query from a sql file and get the data from a database using RODBC
queryDB(
queryFilename,
db,
uid,
pw = "",
sp = " ",
start = " ",
end = " ",
asis = FALSE
)
The filename of the sql query to read in.
The name of your database connection.
Your user ID.
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.
The species scientific name to extract from the database.
The start year.
The end year.
A logical, specifying whether or not to convert columns, as in
read.table
.
Calls RODBC
functions. The function first opens an ODBC
connection and, using sql, extracts data from the db
.