0

I'm trying to do a simple left join using the sqldf (as I usually do):

tot3<-sqldf("select a.*, b.* 
from tot2 a 
left join lagd b on a.rowid = b.rowid+1")

but this time I received a message:

Error in result_create(conn@ptr, statement) : too many SQL variables

Does anybody know how can I overcome it?

  • 2
    What are the columns in the `tot2` and `lagd` data frames? Can you include this information in your question? – Tim Biegeleisen Jun 21 '18 at 01:22
  • 1
    Probable duplicate - https://stackoverflow.com/questions/41586868/error-in-r-using-sqldf-too-many-sql-variables – thelatemail Jun 21 '18 at 02:16
  • Actually I think the problem is that there are several columns in each database (tot2 has 1010 and lagd 505). That is because I can't put all the columns here :( – Rodrigo Miyamoto Jun 21 '18 at 02:55
  • Also, the column's name are not duplicate. Before the left join I changed the names of the lagd using "paste" function. I also check it again right now and everything's fine. – Rodrigo Miyamoto Jun 21 '18 at 02:56

0 Answers0