From 5762efa5e4513c5d97f5261615593a1a98272f3e Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Thu, 3 Mar 2022 19:09:29 +0100 Subject: [PATCH] Consistencia en sqlGenOVID. --- sqlFunctions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlFunctions.R b/sqlFunctions.R index 09e95e2..e95f94d 100644 --- a/sqlFunctions.R +++ b/sqlFunctions.R @@ -62,8 +62,8 @@ sqlShowSamples<-function(conn=dta, nhcs=nhc.test, verb=F, dbtype=NULL){ } sqlGenOVID<-function(conn=dta, nhcs=nhc.test, verb=T, sinc=F, dbtype=NULL){ - if(sqlTables(dta) %>% filter(TABLE_NAME == "UMID") %>% nrow > 0){dbtype<-"UM"} - if(sqlTables(dta) %>% filter(TABLE_NAME == "OVID") %>% nrow > 0){dbtype<-"OV"} + if(sqlTables(conn) %>% filter(TABLE_NAME == "UMID") %>% nrow > 0){dbtype<-"UM"} + if(sqlTables(conn) %>% filter(TABLE_NAME == "OVID") %>% nrow > 0){dbtype<-"OV"} if (dbtype == "OV"){ db<-c("dbcode"="OVID")