Please, let me use this example to explain my question
schema=c(Analytics,Lato)
dbo_name=c(dbo1,dbo2)
Table_name=c(Data,prediction)
Tables are formed when we do.
sqlQuery(con,"SELECT * FROM Analytics.dbo1.Data") or sqlQuery(con,"SELECT * FROM Lato.dbo2.prediction")
Hence two tables will be formed. For my project, I have over 100 tables and doing "SELECT * for each would be eternity.
So I want to run a for loop in this way, but still didn't work.
for(i in 1:2){Table[i]= sqlQuery(con,"SELECT * FROM (schema[i].dbo_name[i].Table_name[i])")'
This still didn't work, please what am I getting wrong?