Dear Stata Users,

This post relates to the previous one, I was not clear enough on that. I need to merge "data1" to "data2" so that date in "data1", which is "facilitystartdate" lies between dates in "data2" which are "start" and "end". For that I used the follwing command:

Code:
use data2 
 rangejoin facilitystartdate start end using "D:\Research\date1.dta", by(lenderid)
The problem is as follows. There are some "gvkey"s in data1 (for example: 1034, 1038, 1045, 1075.., etc.) that correspond to "lenderid"s that are in data2, but not in data1. So, I would assume that these gvkey should not appear in the merged sample. How come this is possible?

I attach .csv (origninal files). Please, help me with this issue.