View source: R/BATsqlQuery64.R
BATsqlQuery64 | R Documentation |
Wrapper function for RODBC:sqlQuery to select batches of specific records from tables or views
BATsqlQuery64(
ids,
table = "PLOT_OWNER",
field = "CN",
idtag = "<I>",
ttag = "<T>",
ftag = "<F>",
query = "SELECT * FROM FS_NWOS.<T> WHERE <F> IN ('<I>')"
)
ids |
is a character vector containing NWOS CNs to be queried. |
table |
is a character string containing the name of the table to be queried. |
field |
is a character string containing the name of the field in the desired table containing the desired CNs. |
idtag |
is a character string containing the name of the tag in the query template that refers to the ids (for use with custom queries). |
ttag |
is a character string containing the name of the tag in the query template that refers to the table (for use with custom queries). |
ftag |
is a character string containing the name of the tag in the query template that refers to the field (for use with custom queries). |
query |
is a character string containing text of a custom SQL query, containing the values of idtag, ttag, and ftag. |
This function must be run on a machine with an ODBC connection (32-bit) to the USFS FIA production database through a user with read permissions.
a dataframe containing the DB return
BATsqlQuery64(ids=c('SAM0001','SAM0002',table=c('SAMPLE'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.