Wildcard join and sqldf inconsistent

25 views
Skip to first unread message

d.ma...@ya.ru

unread,
May 2, 2017, 6:10:33 PM5/2/17
to sqldf
Hi

I am running following code and it does not work as it does on Data Base.
In short it matches only first string in the list. So my join produces about 2 % of required rows only.

http://rextester.com/WSU51736


Vs.



join2 <- sqldf("
select Logs.Column2, Instances.DeviceNumber, Instances.slotlist2
from Logs
inner join Instances ON Logs.Column1 = Instances.DeviceNumber
and (', ' + RTRIM(Instances.slotlist2) + ',') LIKE '%, '+ Logs.Column2 +',%' ")


Any idea what can casue the trouble ?

Gabor Grothendieck

unread,
May 2, 2017, 6:12:30 PM5/2/17
to sqldf
Please provide the code needed to generate the R data frames used so 
it can just be copied and pasted into R.
Reply all
Reply to author
Forward
0 new messages