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
)

Arguments

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 read.table.

Details

Calls RODBC functions. The function first opens an ODBC connection and, using sql, extracts data from the db.

See also

Author

Kelli F. Johnson