Description Usage Arguments Details Functions Examples
View source: R/SF_sql_reading.R
Extraction using the column order given in the database does not always work. I suspect this is due to the issue https://github.com/r-dbi/odbc/issues/112.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | getSFtable(
  tablename,
  schema,
  con,
  last = NULL,
  tryperm = FALSE,
  verbose = tryperm,
  n = -1,
  params = NULL,
  ...
)
colsfromtbl(cols, tablename, schema, con, n = -1, params = NULL, ...)
 | 
| tablename | The name of table to extract columns from | 
| schema | The schema containing the table | 
| con | A connection to the SQL database. Created, for example, by  | 
| last | Column names to put last when querying the database | 
| tryperm | TRUE means try different permutations of the column ordering until table successfully extracted. | 
| verbose | If TRUE prints each permutation of column names before it is tried. | 
| n | Passed to dbGetQuery. Maximum number of records to retrieve per fetch. Use n = -1 or n = Inf to retrieve all pending records. Some implementations may recognize other special values. | 
| params | Query parameters to pass to dbBind() via dbGetQuery. See dbBind() for details. | 
| cols | A list of column names to extract | 
Best guesses so far is that all columns of data type 'varchar' must be read last (credit to https://github.com/r-dbi/odbc/issues/86#issuecomment-314492486).
The bug report here https://github.com/r-dbi/odbc/issues/10 also suggests 'varbinary' types should be places last.
The names of columns of these types are appeneded to last in getSFtable.
colsfromtbl: Extract specific columns from a table in the SQL database
| 1 | out <- getSFtable("tblPost-fireAcaciaBasal", "VicBirdsVegetation", con, last = "VisitCode2")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.