|
@ -24,7 +24,7 @@ sqlInitialize<-function(){ |
|
|
|
|
|
|
|
|
sqlBackUp<-function(dbfile=file,conn=dta,bu.dir=NULL){ |
|
|
sqlBackUp<-function(dbfile=file,conn=dta,bu.dir=NULL){ |
|
|
if(sqlTables(conn) %>% filter(TABLE_NAME == "UMID") %>% nrow > 0){bu.dir<-"BU_UM"} |
|
|
if(sqlTables(conn) %>% filter(TABLE_NAME == "UMID") %>% nrow > 0){bu.dir<-"BU_UM"} |
|
|
if(sqlTables(conn) %>% filter(TABLE_NAME == "OVID") %>% nrow > 0){dbtype<-"BU_OVARIO"} |
|
|
|
|
|
|
|
|
if(sqlTables(conn) %>% filter(TABLE_NAME == "OVID") %>% nrow > 0){bu.dir<-"BU_OVARIO"} |
|
|
|
|
|
|
|
|
db=strsplit(dbfile, "/")[[1]]%>% tail(n=1) |
|
|
db=strsplit(dbfile, "/")[[1]]%>% tail(n=1) |
|
|
bu_path<-gsub(db,bu.dir,dbfile) |
|
|
bu_path<-gsub(db,bu.dir,dbfile) |
|
|