I need have a data.table named "clients", the name is same that is in my database. (this example is with table "clients" but i will need more tables with others names)
tbl_import <- function (table)
{
sql<-glue_sql(paste0("select * from table"),.con=con)
table <- dbGetQuery(con,sql)
setDT(table)
table <<- copy(table)
table <<- table ##I replace with this too in another try but didn't work either
}
tbl_import("clients")
When i run this i don't have the data.table with the name of "clients",I get a table with name "table"