R sqldf: Error table already in test

828 views Asked by At

I tested the code before and it didn't give me any errors. Now there is an error "sqldf: table T1 already in test". How can I fix it?

ret <- sqldf("SELECT T1.*, T2.score FROM T1 JOIN T2 USING(date)")
2

There are 2 answers

0
user2962636 On BEST ANSWER

You just need to execute:

sqldf("drop table test.T1")
0
aidey On

You may have a dataframe with the same name as your database table. Clear your environment and try again.