Correcting some workflow positions. Changing sqlDropLast to sqlLastDrop to avoid errors with sqlDrop.
This commit is contained in:
@@ -18,7 +18,7 @@ knitr::opts_chunk$set(echo = TRUE)
|
||||
Removes from Database the last (or the amount specified) entry.
|
||||
|
||||
### Usage
|
||||
sqlDropLast(conn, tablename, droplast=1, dbtype=NULL)
|
||||
sqlLastDrop(conn, tablename, droplast=1, dbtype=NULL)
|
||||
|
||||
### Arguments
|
||||
Argument|Description
|
||||
@@ -37,12 +37,12 @@ Invisibly for success (and failures cause errors).
|
||||
### Examples
|
||||
```r
|
||||
dta<-odbcConnect("test")
|
||||
sqlDropLast(dta, "TableTest")
|
||||
sqlLastDrop(dta, "TableTest")
|
||||
```
|
||||
|
||||
### Function
|
||||
```r
|
||||
sqlDropLast<-function(conn, tablename, droplast=1,dbtype=NULL){
|
||||
sqlLastDrop<-function(conn, tablename, droplast=1,dbtype=NULL){
|
||||
if(sqlTables(conn) %>% filter(TABLE_NAME == "UMID") %>% nrow > 0){dbtype<-"UM"}
|
||||
if(sqlTables(conn) %>% filter(TABLE_NAME == "OVID") %>% nrow > 0){dbtype<-"OV"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user