How can I use the LIKE
clause with an inner join using sqldf in R?
The code:
Name <- c("Jack","Jill","Romeo")
Name <- as.data.frame(Name)
FullName <- c("School Jack H", "School Juliet G", "College Jill M", "College Romeo F")
Marks <- c("100","82","54","0")
FullBio <- cbind(FullName, Marks)
FullBio <-as.data.frame(FullBio)
And then when I run:
sqldf("select a.*, b.* from Name a join FullBio b on a.Name like '%'+b.[FullName]+'%'")
returns 0 rows.
Why? What are my other alternatives please. I apologise for making you create so many variables to run my code.